Individual player reports! Also forgot to mention addition of /anti alias and /anticheat spy command in last commit.

This commit is contained in:
Adam committed 2012-05-27 18:55:34 -04:00
1 parent 33dfb97a1b
commit 915c46c58c
5 files changed
+199 -13

No files matched your search

@@ -54,7 +54,7 @@ public enum CheckType
ITEM_SPAM("anticheat.itemspam");
private final String permission;
private static final Map<String,Integer> level = new HashMap<String,Integer>();
private final Map<String,Integer> level = new HashMap<String,Integer>();
private CheckType(String permission)
{
@@ -80,6 +80,11 @@ public enum CheckType
}
}
public void clearUse(Player player)
{
level.put(player.getName(), 0);
}
public int getUses(Player player)
{
int use = 0;
@@ -89,4 +94,11 @@ public enum CheckType
}
return use;
}
public static String getName(CheckType type)
{
char[] chars = type.toString().replaceAll("_", " ").toLowerCase().toCharArray();
chars[0] = Character.toUpperCase(chars[0]);
return new String(chars);
}
}
@@ -126,6 +126,10 @@ public class PlayerManager
public void reset(Player player)
{
level.put(player.getName(),0);
for(CheckType type : CheckType.values())
{
type.clearUse(player);
}
}
public Map<String,Integer> getLevels()
@@ -103,6 +103,18 @@ public final class Utilities
Material lily = Material.WATER_LILY;
return block.getType() == lily || block.getRelative(BlockFace.NORTH).getType() == lily || block.getRelative(BlockFace.SOUTH).getType() == lily || block.getRelative(BlockFace.EAST).getType() == lily || block.getRelative(BlockFace.WEST).getType() == lily;
}
public static boolean isInt(String string)
{
boolean x = false;
try {
Integer.parseInt(string);
x = true;
}
catch(Exception ex)
{
}
return x;
}
static
{
INSTANT_BREAK.add(Material.RED_MUSHROOM);