Added anticheat.alert permission node so that people can get notified even if they dont have admin. Also, a fancy readme!

This commit is contained in:
Adam committed 2012-05-14 21:32:48 -04:00
1 parent ec23861ca1
commit a61dc4fde8
4 files changed
+35 -12

No files matched your search

@@ -36,7 +36,7 @@ public class PlayerManager {
execute("Medium",player);
for(Player p : player.getServer().getOnlinePlayers())
{
if(p.hasPermission("anticheat.admin") || p.isOp())
if(p.hasPermission("anticheat.alert") || p.hasPermission("anticheat.admin") || p.isOp())
{
p.sendMessage(ChatColor.YELLOW+"[ALERT] "+ChatColor.WHITE+player.getName()+ChatColor.YELLOW+" has entered the MEDIUM hack level.");
p.sendMessage(ChatColor.YELLOW+"[ALERT] This means they may be using a hacked client or may have a bad connection!");
@@ -48,7 +48,7 @@ public class PlayerManager {
execute("High",player);
for(Player p : player.getServer().getOnlinePlayers())
{
if(p.hasPermission("anticheat.admin") || p.isOp())
if(p.hasPermission("anticheat.alert") || p.hasPermission("anticheat.admin") || p.isOp())
{
p.sendMessage(ChatColor.RED+"[ALERT] "+ChatColor.WHITE+player.getName()+ChatColor.RED+" has entered the HIGH hack level.");
p.sendMessage(ChatColor.RED+"[ALERT] This means they probably are hacking or are lagging out!");
@@ -66,14 +66,7 @@ public final class Utilities
{
Block block = player.getLocation().getBlock();
Material lily = Material.WATER_LILY;
if(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)
{
return true;
}
else
{
return false;
}
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;
}
static
{
@@ -68,7 +68,7 @@ public class Metrics {
/**
* The current revision number
*/
private final static int REVISION = 5;
private static final int REVISION = 5;
/**
* The base url of the metrics domain
@@ -94,7 +94,7 @@ public class Metrics {
/**
* Interval of time to ping (in minutes)
*/
private final static int PING_INTERVAL = 10;
private static final int PING_INTERVAL = 10;
/**
* The plugin this metrics submits for