Update 3.3 + fix permission error

This commit is contained in:
Xephi
2014-01-27 20:33:34 +01:00
parent 90ae238c15
commit 2e5da58aca
36 changed files with 616 additions and 314 deletions
+1 -1
View File
@@ -192,7 +192,7 @@ public class PlayerAuth {
public String getWorld() {
return world;
}
@Override
public String toString() {
String s = "Player : " + nickname + " ! IP : " + ip + " ! LastLogin : " + lastLogin + " ! LastPosition : " + x + "," + y + "," + z + "," + world
@@ -39,4 +39,8 @@ public class PlayerCache {
return singleton;
}
public int getLogged() {
return cache.size();
}
}
+2 -2
View File
@@ -38,7 +38,7 @@ public class FileCache {
if (operator)
s = s + "1";
else s = s + "0";
// line format Group|OperatorStatus|isFlying
if(flying)
writer.write(s+";1" + API.newline);
@@ -134,7 +134,7 @@ public class FileCache {
if (!in[0].equals("i") && !in[0].equals("w")) {
continue;
}
// can enchant item? size ofstring in file - 4 all / 2 = number of enchant
// can enchant item? size ofstring in file - 4 all / 2 = number of enchant
if (in[0].equals("i")) {
stacki[i] = new ItemStack(Material.getMaterial(in[1]),
Integer.parseInt(in[2]), Short.parseShort((in[3])));
+2 -8
View File
@@ -30,7 +30,6 @@ public class LimboCache {
public void addLimboPlayer(Player player) {
String name = player.getName().toLowerCase();
Location loc = player.getLocation();
loc.setY(loc.getY() + 0.4D);
GameMode gameMode = player.getGameMode();
ItemStack[] arm;
ItemStack[] inv;
@@ -67,6 +66,8 @@ public class LimboCache {
if(player.isFlying())
flying = true;
else flying = false;
if (plugin.permission != null)
playerGroup = plugin.permission.getPrimaryGroup(player);
}
if(Settings.isForceSurvivalModeEnabled) {
@@ -83,13 +84,6 @@ public class LimboCache {
if(player.isDead()) {
loc = plugin.getSpawnLocation(player.getWorld());
}
try {
if(cache.containsKey(name) && playerGroup.isEmpty()) {
LimboPlayer groupLimbo = cache.get(name);
playerGroup = groupLimbo.getGroup();
}
} catch (NullPointerException ex) {
}
cache.put(player.getName().toLowerCase(), new LimboPlayer(name, loc, inv, arm, gameMode, operator, playerGroup, flying));
}