diff --git a/src/com/cnaude/chairs/CommandRestrict.java b/src/com/cnaude/chairs/CommandRestrict.java index 49ae2c5..510e3b3 100644 --- a/src/com/cnaude/chairs/CommandRestrict.java +++ b/src/com/cnaude/chairs/CommandRestrict.java @@ -20,13 +20,14 @@ public class CommandRestrict implements Listener { String playercommand = event.getMessage().toLowerCase(); if (plugin.sit.containsKey(player.getName())) { + if (plugin.sitDisableAllCommands) + { + event.setCancelled(true); + player.sendMessage(plugin.msgCommandRestricted); + return; + } for (String disabledCommand : plugin.sitDisabledCommands) { - if (plugin.sitDisableAllCommands) - { - event.setCancelled(true); - player.sendMessage(plugin.msgCommandRestricted); - } else if (disabledCommand.startsWith(playercommand)) { String therest = disabledCommand.replace(playercommand, ""); @@ -34,6 +35,7 @@ public class CommandRestrict implements Listener { { event.setCancelled(true); player.sendMessage(plugin.msgCommandRestricted); + return; } } }