Update 3.3 + fix permission error
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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])));
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user