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 | 4167dd25903d6bf75f6f84d919d088532a9c2fe3 (patch) | |
tree | 4f931d79d914d5f99e668b83103ef428bea586dc /EssentialsGroupManager/src/org | |
parent | 623ff0f6290d6cc518a9a7dcb7f301dea7e4364f (diff) | |
download | Essentials-4167dd25903d6bf75f6f84d919d088532a9c2fe3.tar Essentials-4167dd25903d6bf75f6f84d919d088532a9c2fe3.tar.gz Essentials-4167dd25903d6bf75f6f84d919d088532a9c2fe3.tar.lz Essentials-4167dd25903d6bf75f6f84d919d088532a9c2fe3.tar.xz Essentials-4167dd25903d6bf75f6f84d919d088532a9c2fe3.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; } |