This commit is contained in:
Alexandre V. 2013-03-10 01:29:07 +01:00
parent f7e7b3e252
commit 6a3dc273ed
6 changed files with 51 additions and 33 deletions

View File

@ -28,7 +28,7 @@
</plugin>
</plugins>
</build>
<version>2.7.10b1</version>
<version>2.7.10b2</version>
<dependencies>
<dependency>
<groupId>org.bukkit</groupId>

View File

@ -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;
}
}

View File

@ -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++) {

View File

@ -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()){

View File

@ -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:

View File

@ -3,8 +3,8 @@ 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.2b3
softdepend: [Vault]
version: 2.7.10b2
softdepend: [Vault, ChestShop, Spout, Multiverse-Core, Notifications, Citizens, CombatTag]
commands:
register:
description: Register an account
@ -29,6 +29,12 @@ commands:
authme:
description: AuthMe op commands
usage: '/authme reload|register playername password|changepassword playername password|unregister playername|version'
email:
description: Add Email or recover password
usage: '/email add your@email.com your@email.com|change oldEmail newEmail|recovery your@email.com'
captcha:
description: Captcha
usage: /captcha theCaptcha
permissions:
authme.player.*:
description: Gives access to all authme player commands
@ -50,6 +56,10 @@ permissions:
authme.admin.changepassword: true
authme.admin.unregister: true
authme.admin.purge: true
authme.seeOtherAccounts: true
authme.admin.lastlogin: true
authme.admin.getemail: true
authme.admin.chgemail: true
authme.register:
description: Register an account
default: true
@ -62,12 +72,18 @@ permissions:
authme.logout:
description: Logout
default: true
authme.email:
description: Email
default: true
authme.passpartu:
description: passpartu
default: true
authme.allow2accounts:
description: allow more accounts for same ip
default: false
authme.seeOtherAccounts:
description: display other accounts about a player when he logs in
default: false
authme.unregister:
description: unregister your account
default: true
@ -94,4 +110,19 @@ permissions:
default: op
authme.admin.lastlogin:
description: Get last login date about a player
default: op
default: op
authme.admin.getemail:
description: Get last email about a player
default: op
authme.admin.chgemail:
description: Change a player email
default: op
authme.admin.accounts:
description: Display Players Accounts
default: op
authme.admin.xauthimport:
description: Import xAuth Database to AuthMe Database
default: op
authme.captcha:
description: Captcha
default: true