diff options
author | Necrodoom <doomed.war@gmail.com> | 2013-01-30 18:53:40 +0200 |
---|---|---|
committer | Necrodoom <doomed.war@gmail.com> | 2013-01-30 18:53:40 +0200 |
commit | 01aa20d7ef2414528753ffb7fa936cb3bba75f8a (patch) | |
tree | c1227168ed7988d0ed277c70ce4b0e2cdcf9b651 /EssentialsGroupManager/src/org | |
parent | 689a8655ceeb38deacd94236ecb2dfa584f33f5a (diff) | |
download | Essentials-01aa20d7ef2414528753ffb7fa936cb3bba75f8a.tar Essentials-01aa20d7ef2414528753ffb7fa936cb3bba75f8a.tar.gz Essentials-01aa20d7ef2414528753ffb7fa936cb3bba75f8a.tar.lz Essentials-01aa20d7ef2414528753ffb7fa936cb3bba75f8a.tar.xz Essentials-01aa20d7ef2414528753ffb7fa936cb3bba75f8a.zip |
add allow commandblock check
Diffstat (limited to 'EssentialsGroupManager/src/org')
-rw-r--r-- | EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java index 050bd9995..b99bebf63 100644 --- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java @@ -387,10 +387,11 @@ public class GroupManager extends JavaPlugin { Group senderGroup = null; User senderUser = null; boolean isOpOverride = config.isOpOverride(); + boolean isAllowCommandBlocks = config.isAllowCommandBlocks(); // PREVENT GM COMMANDS BEING USED ON COMMANDBLOCKS - if (sender instanceof BlockCommandSender) { - sender.sendMessage(ChatColor.RED + "GM Commands can not be called from CommandBlocks"); + if (sender instanceof BlockCommandSender && !isAllowCommandBlocks) { + console.sendMessage(ChatColor.RED + "GM Commands can not be called from CommandBlocks"); return true; } |