diff options
author | ElgarL <ElgarL@palmergames.com> | 2012-11-11 20:56:07 +0000 |
---|---|---|
committer | ElgarL <ElgarL@palmergames.com> | 2012-11-11 20:56:07 +0000 |
commit | 0857d498e51b8dcb79b6664b32e2dab2eba22960 (patch) | |
tree | 08104afdf3f677ffdedd8639827072990c04cd53 /EssentialsGroupManager/src/org | |
parent | bf196eb2dcd98dd2bf71775de827ca9342ac206d (diff) | |
download | Essentials-0857d498e51b8dcb79b6664b32e2dab2eba22960.tar Essentials-0857d498e51b8dcb79b6664b32e2dab2eba22960.tar.gz Essentials-0857d498e51b8dcb79b6664b32e2dab2eba22960.tar.lz Essentials-0857d498e51b8dcb79b6664b32e2dab2eba22960.tar.xz Essentials-0857d498e51b8dcb79b6664b32e2dab2eba22960.zip |
Prevent GM commands from being used on CommandBlocks.
Diffstat (limited to 'EssentialsGroupManager/src/org')
-rw-r--r-- | EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java index b02b2ccd6..1f19f32bd 100644 --- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java @@ -381,6 +381,12 @@ public class GroupManager extends JavaPlugin { Group senderGroup = null; User senderUser = null; boolean isOpOverride = config.isOpOverride(); + + // PREVENT GM COMMANDS BEING USED ON COMMANDBLOCKS + if (sender.getClass().getName().equals("org.bukkit.command.BlockCommandSender")) { + sender.sendMessage(ChatColor.RED + "GM Commands can not be called from CommandBlocks"); + return true; + } // DETERMINING PLAYER INFORMATION if (sender instanceof Player) { |