diff --git a/README.md b/README.md new file mode 100644 index 0000000..68887b8 --- /dev/null +++ b/README.md @@ -0,0 +1,30 @@ +AntiCheat +============= + +Stop hackers and cheaters in their tracks! + +Usage +------- +Simply drag and drop the plugin into your Plugins folder. Optional configuration and permissions are avaliable: + +http://dev.bukkit.org/server-mods/anticheat/pages/configuration/ + +http://dev.bukkit.org/server-mods/anticheat/pages/permissions/ + +Developer stuff: +------- +API Usage: http://dev.bukkit.org/server-mods/anticheat/pages/api-documentation/ + +Bug Reporting/Support/Questions +------------ + +Feel free to leave a DETAILED comment describing the problem, the steps you take to re-create the problem, the result you got, and the result you EXPECTED to get on my BukkitDev page (see below). If you do that I'll be sure to reply back and take a look at the bug. +I'm also around a lot in IRC. Feel free to join me in #anticheat on irc.esper.net and ping me to report a game-breaking bug, or just to ask questions, get support, etc. + +Resources +------- +BukkitDev --- http://dev.bukkit.org/server-mods/anticheat/ + +Jenkins (Downloads) --- http://ci.h31ix.net/job/AntiCheat/ + +Latest version download: http://bukget.org/api/plugin/anticheat/latest/download \ No newline at end of file diff --git a/src/main/java/net/h31ix/anticheat/manage/PlayerManager.java b/src/main/java/net/h31ix/anticheat/manage/PlayerManager.java index eba174f..128d574 100644 --- a/src/main/java/net/h31ix/anticheat/manage/PlayerManager.java +++ b/src/main/java/net/h31ix/anticheat/manage/PlayerManager.java @@ -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!"); diff --git a/src/main/java/net/h31ix/anticheat/manage/Utilities.java b/src/main/java/net/h31ix/anticheat/manage/Utilities.java index 39324c7..38a6f18 100644 --- a/src/main/java/net/h31ix/anticheat/manage/Utilities.java +++ b/src/main/java/net/h31ix/anticheat/manage/Utilities.java @@ -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 { diff --git a/src/main/java/net/h31ix/anticheat/metrics/Metrics.java b/src/main/java/net/h31ix/anticheat/metrics/Metrics.java index ddca143..a7834f6 100644 --- a/src/main/java/net/h31ix/anticheat/metrics/Metrics.java +++ b/src/main/java/net/h31ix/anticheat/metrics/Metrics.java @@ -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