Update 3.2
//Changes 3.2:// * Fix Password showed in console ( support for Log4J ) * Quit Location will be more precise ( now double instead of int ) * Force command after the /register too * Close inventory when player try to open one unlogged * Fix old password supports * Remove some Magic Values ( 1.7.2+ ) * Fix threads not start correctly * Add a recall email adding message * Fix catpcha messages * Add multilines messages ( add &n ) * Fix some inventory problem * Fix some events problem * Call login event after /register
This commit is contained in:
+16
-16
@@ -9,9 +9,9 @@ public class PlayerAuth {
|
||||
private String hash = "";
|
||||
private String ip = "198.18.0.1";
|
||||
private long lastLogin = 0;
|
||||
private int x = 0;
|
||||
private int y = 0;
|
||||
private int z = 0;
|
||||
private double x = 0;
|
||||
private double y = 0;
|
||||
private double z = 0;
|
||||
private String world = "world";
|
||||
private String salt = "";
|
||||
private String vBhash = null;
|
||||
@@ -28,7 +28,7 @@ public class PlayerAuth {
|
||||
this.realName = realName;
|
||||
}
|
||||
|
||||
public PlayerAuth(String nickname, int x, int y, int z, String world) {
|
||||
public PlayerAuth(String nickname, double x, double y, double z, String world) {
|
||||
this.nickname = nickname;
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
@@ -36,7 +36,7 @@ public class PlayerAuth {
|
||||
this.world = world;
|
||||
}
|
||||
|
||||
public PlayerAuth(String nickname, String hash, String ip, long lastLogin, int x, int y, int z, String world, String email, String realName) {
|
||||
public PlayerAuth(String nickname, String hash, String ip, long lastLogin, double x, double y, double z, String world, String email, String realName) {
|
||||
this.nickname = nickname;
|
||||
this.hash = hash;
|
||||
this.ip = ip;
|
||||
@@ -49,7 +49,7 @@ public class PlayerAuth {
|
||||
this.realName = realName;
|
||||
}
|
||||
|
||||
public PlayerAuth(String nickname, String hash, String salt, int groupId, String ip, long lastLogin, int x, int y, int z, String world, String email, String realName) {
|
||||
public PlayerAuth(String nickname, String hash, String salt, int groupId, String ip, long lastLogin, double x, double y, double z, String world, String email, String realName) {
|
||||
this.nickname = nickname;
|
||||
this.hash = hash;
|
||||
this.ip = ip;
|
||||
@@ -83,7 +83,7 @@ public class PlayerAuth {
|
||||
this.realName = realName;
|
||||
}
|
||||
|
||||
public PlayerAuth(String nickname, String hash, String salt, String ip, long lastLogin, int x, int y, int z, String world, String email, String realName) {
|
||||
public PlayerAuth(String nickname, String hash, String salt, String ip, long lastLogin, double x, double y, double z, String world, String email, String realName) {
|
||||
this.nickname = nickname;
|
||||
this.hash = hash;
|
||||
this.ip = ip;
|
||||
@@ -123,26 +123,26 @@ public class PlayerAuth {
|
||||
return groupId;
|
||||
}
|
||||
|
||||
public int getQuitLocX() {
|
||||
public double getQuitLocX() {
|
||||
return x;
|
||||
}
|
||||
public int getQuitLocY() {
|
||||
public double getQuitLocY() {
|
||||
return y;
|
||||
}
|
||||
public int getQuitLocZ() {
|
||||
public double getQuitLocZ() {
|
||||
return z;
|
||||
}
|
||||
public String getEmail() {
|
||||
return email;
|
||||
}
|
||||
public void setQuitLocX(int x) {
|
||||
this.x = x;
|
||||
public void setQuitLocX(double d) {
|
||||
this.x = d;
|
||||
}
|
||||
public void setQuitLocY(int y) {
|
||||
this.y = y;
|
||||
public void setQuitLocY(double d) {
|
||||
this.y = d;
|
||||
}
|
||||
public void setQuitLocZ(int z) {
|
||||
this.z = z;
|
||||
public void setQuitLocZ(double d) {
|
||||
this.z = d;
|
||||
}
|
||||
public long getLastLogin() {
|
||||
return lastLogin;
|
||||
|
||||
@@ -49,12 +49,12 @@ public class FileCache {
|
||||
|
||||
for (int i = 0; i < invstack.length; i++) {
|
||||
|
||||
int itemid = 0;
|
||||
String itemid = "AIR";
|
||||
int amount = 0;
|
||||
int durability = 0;
|
||||
String enchList = "";
|
||||
if (invstack[i] != null) {
|
||||
itemid = invstack[i].getTypeId();
|
||||
itemid = invstack[i].getType().name();
|
||||
amount = invstack[i].getAmount();
|
||||
durability = invstack[i].getDurability();
|
||||
for(Enchantment e : invstack[i].getEnchantments().keySet()) {
|
||||
@@ -69,12 +69,12 @@ public class FileCache {
|
||||
ItemStack[] armorstack = playerData.getArmour();
|
||||
|
||||
for (int i = 0; i < armorstack.length; i++) {
|
||||
int itemid = 0;
|
||||
String itemid = "AIR";
|
||||
int amount = 0;
|
||||
int durability = 0;
|
||||
String enchList = "";
|
||||
if (armorstack[i] != null) {
|
||||
itemid = armorstack[i].getTypeId();
|
||||
itemid = armorstack[i].getType().name();
|
||||
amount = armorstack[i].getAmount();
|
||||
durability = armorstack[i].getDurability();
|
||||
for(Enchantment e : armorstack[i].getEnchantments().keySet()) {
|
||||
@@ -136,7 +136,7 @@ public class FileCache {
|
||||
}
|
||||
// can enchant item? size ofstring in file - 4 all / 2 = number of enchant
|
||||
if (in[0].equals("i")) {
|
||||
stacki[i] = new ItemStack(Material.getMaterial(Integer.parseInt(in[1])),
|
||||
stacki[i] = new ItemStack(Material.getMaterial(in[1]),
|
||||
Integer.parseInt(in[2]), Short.parseShort((in[3])));
|
||||
if(in.length > 4 && !in[4].isEmpty()) {
|
||||
for(int k=4;k<in.length-1;k++) {
|
||||
@@ -146,7 +146,7 @@ public class FileCache {
|
||||
}
|
||||
i++;
|
||||
} else {
|
||||
stacka[a] = new ItemStack(Material.getMaterial(Integer.parseInt(in[1])),
|
||||
stacka[a] = new ItemStack(Material.getMaterial(in[1]),
|
||||
Integer.parseInt(in[2]), Short.parseShort((in[3])));
|
||||
if(in.length > 4 && !in[4].isEmpty()) {
|
||||
for(int k=4;k<in.length-1;k++) {
|
||||
|
||||
Reference in New Issue
Block a user