diff --git a/pom.xml b/pom.xml index 0b2956a5..7748e32c 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 cc.co.evenprime.bukkit NoCheat - 2.22 + 2.22a jar NoCheat diff --git a/src/cc/co/evenprime/bukkit/nocheat/NoCheat.java b/src/cc/co/evenprime/bukkit/nocheat/NoCheat.java index 946fb97f..b93c8d22 100644 --- a/src/cc/co/evenprime/bukkit/nocheat/NoCheat.java +++ b/src/cc/co/evenprime/bukkit/nocheat/NoCheat.java @@ -142,11 +142,6 @@ public class NoCheat extends JavaPlugin { public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { boolean result = CommandHandler.handleCommand(this, sender, command, label, args); - if(!result && sender instanceof Player) { - sender.sendMessage("Unknown command. Type \"help\" for help."); - return true; - } - return result; } diff --git a/src/cc/co/evenprime/bukkit/nocheat/checks/inventory/CCInventory.java b/src/cc/co/evenprime/bukkit/nocheat/checks/inventory/CCInventory.java index d4d7b295..78c72be0 100644 --- a/src/cc/co/evenprime/bukkit/nocheat/checks/inventory/CCInventory.java +++ b/src/cc/co/evenprime/bukkit/nocheat/checks/inventory/CCInventory.java @@ -16,11 +16,20 @@ public class CCInventory implements ConfigItem { public CCInventory(Configuration data) { - check = data.getBoolean(Configuration.INVENTORY_CHECK); - dropCheck = data.getBoolean(Configuration.INVENTORY_DROP_CHECK); - dropTimeFrame = data.getInteger(Configuration.INVENTORY_DROP_TIMEFRAME); - dropLimit = data.getInteger(Configuration.INVENTORY_DROP_LIMIT); - dropActions = data.getActionList(Configuration.INVENTORY_DROP_ACTIONS); + /* + * check = data.getBoolean(Configuration.INVENTORY_CHECK); + * dropCheck = data.getBoolean(Configuration.INVENTORY_DROP_CHECK); + * dropTimeFrame = + * data.getInteger(Configuration.INVENTORY_DROP_TIMEFRAME); + * dropLimit = data.getInteger(Configuration.INVENTORY_DROP_LIMIT); + * dropActions = + * data.getActionList(Configuration.INVENTORY_DROP_ACTIONS); + */ + check = false; + dropCheck = false; + dropTimeFrame = 0; + dropLimit = 0; + dropActions = null; closebeforeteleports = data.getBoolean(Configuration.INVENTORY_PREVENTITEMDUPE); } diff --git a/src/cc/co/evenprime/bukkit/nocheat/command/CommandHandler.java b/src/cc/co/evenprime/bukkit/nocheat/command/CommandHandler.java index ee2990f8..3255cb91 100644 --- a/src/cc/co/evenprime/bukkit/nocheat/command/CommandHandler.java +++ b/src/cc/co/evenprime/bukkit/nocheat/command/CommandHandler.java @@ -23,6 +23,11 @@ public class CommandHandler { public static boolean handleCommand(NoCheat plugin, CommandSender sender, Command command, String label, String[] args) { + if(sender instanceof Player && !sender.hasPermission(Permissions.ADMIN_PLAYERINFO) && !sender.hasPermission(Permissions.ADMIN_PERMLIST) && !sender.hasPermission(Permissions.ADMIN_RELOAD) && !sender.hasPermission(Permissions.ADMIN_PERFORMANCE)) { + sender.sendMessage("Unknown command. Type \"help\" for help."); + return true; + } + boolean result = false; // Not our command if(!command.getName().equalsIgnoreCase("nocheat") || args.length == 0) {