2.7.10b2
This commit is contained in:
@@ -27,8 +27,8 @@ public class DataFileCache {
|
||||
public DataFileCache(ItemStack[] inventory, ItemStack[] armor, String group, boolean operator){
|
||||
this.inventory = inventory;
|
||||
this.armor = armor;
|
||||
this.group = group;
|
||||
this.operator = operator;
|
||||
this.group = group;
|
||||
this.operator = operator;
|
||||
}
|
||||
public ItemStack[] getInventory(){
|
||||
return inventory;
|
||||
@@ -43,7 +43,7 @@ public class DataFileCache {
|
||||
}
|
||||
|
||||
public Boolean getOperator(){
|
||||
return operator;
|
||||
return operator;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -15,8 +15,6 @@ import java.util.Scanner;
|
||||
import org.bukkit.enchantments.Enchantment;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import uk.org.whoami.authme.ConsoleLogger;
|
||||
|
||||
|
||||
public class FileCache {
|
||||
//private HashMap<Enchantment, Integer> ench;
|
||||
@@ -71,14 +69,9 @@ public class FileCache {
|
||||
|
||||
for(Enchantment e : invstack[i].getEnchantments().keySet())
|
||||
{
|
||||
try {
|
||||
enchList = enchList.concat(e.getName()+":"+invstack[i].getEnchantmentLevel(e)+":");
|
||||
} catch (NullPointerException npe) {
|
||||
ConsoleLogger.showError(npe.getMessage());
|
||||
ConsoleLogger.showError("The player " + playername + " has an illegaly enchant, Check Him !");
|
||||
}
|
||||
|
||||
|
||||
//System.out.println("enchant "+e.getName()+" bog "+invstack[i].getEnchantmentLevel(e));
|
||||
enchList = enchList.concat(e.getName()+":"+invstack[i].getEnchantmentLevel(e)+":");
|
||||
//System.out.println(enchList);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -103,13 +96,9 @@ public class FileCache {
|
||||
|
||||
for(Enchantment e : armorstack[i].getEnchantments().keySet())
|
||||
{
|
||||
try {
|
||||
enchList = enchList.concat(e.getName()+":"+armorstack[i].getEnchantmentLevel(e)+":");
|
||||
} catch (NullPointerException npe) {
|
||||
ConsoleLogger.showError(npe.getMessage());
|
||||
ConsoleLogger.showError("The player " + playername + " has an illegaly enchant, Check Him !");
|
||||
}
|
||||
|
||||
//System.out.println("enchant "+e.getName()+" bog "+armorstack[i].getEnchantmentLevel(e));
|
||||
enchList = enchList.concat(e.getName()+":"+armorstack[i].getEnchantmentLevel(e)+":");
|
||||
//System.out.println(enchList);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -170,7 +159,8 @@ 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(Integer.parseInt(in[1]),
|
||||
|
||||
stacki[i] = new ItemStack(Integer.parseInt(in[1]),
|
||||
Integer.parseInt(in[2]), Short.parseShort((in[3])));
|
||||
// qui c'e' un problema serio!
|
||||
if(in.length > 4 && !in[4].isEmpty()) {
|
||||
@@ -182,7 +172,7 @@ public class FileCache {
|
||||
}
|
||||
i++;
|
||||
} else {
|
||||
stacka[a] = new ItemStack(Integer.parseInt(in[1]),
|
||||
stacka[a] = new ItemStack(Integer.parseInt(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++) {
|
||||
|
||||
@@ -722,12 +722,9 @@ public class AuthMePlayerListener implements Listener {
|
||||
}
|
||||
// isent in session or session was ended correctly
|
||||
LimboCache.getInstance().addLimboPlayer(player);
|
||||
|
||||
try {
|
||||
playerBackup.createCache(name, new DataFileCache(LimboCache.getInstance().getLimboPlayer(name).getInventory(),LimboCache.getInstance().getLimboPlayer(name).getArmour()), LimboCache.getInstance().getLimboPlayer(name).getGroup(),LimboCache.getInstance().getLimboPlayer(name).getOperator());
|
||||
} catch (NullPointerException npe) {
|
||||
ConsoleLogger.showError("Problem while trying to create player cache for : " + name);
|
||||
}
|
||||
|
||||
DataFileCache dataFile = new DataFileCache(LimboCache.getInstance().getLimboPlayer(name).getInventory(),LimboCache.getInstance().getLimboPlayer(name).getArmour());
|
||||
playerBackup.createCache(name, dataFile, LimboCache.getInstance().getLimboPlayer(name).getGroup(),LimboCache.getInstance().getLimboPlayer(name).getOperator());
|
||||
|
||||
} else {
|
||||
if(!Settings.unRegisteredGroup.isEmpty()){
|
||||
|
||||
@@ -3,7 +3,7 @@ author: darkwarriros,Xephi
|
||||
website: http://www.multiplayer-italia.com/
|
||||
description: AuthMe prevents people, which aren't logged in, from doing stuff like placing blocks, moving, typing commands or seeing the inventory of the current player.
|
||||
main: uk.org.whoami.authme.AuthMe
|
||||
version: 2.7.10b1
|
||||
version: 2.7.10b2
|
||||
softdepend: [Vault, ChestShop, Spout, Multiverse-Core, Notifications, Citizens, CombatTag]
|
||||
commands:
|
||||
register:
|
||||
|
||||
Reference in New Issue
Block a user