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 | a7aa8be37a1bd3e4432d39d2a7e7666ff2b3ca98 (patch) | |
tree | 7c139ef657ba520e2d450d8acb13006fc4ed9f47 /EssentialsGroupManager/src/org/anjocaido/groupmanager | |
parent | 237c896fffc20404635742091c29d5d9de927cd8 (diff) | |
download | Essentials-a7aa8be37a1bd3e4432d39d2a7e7666ff2b3ca98.tar Essentials-a7aa8be37a1bd3e4432d39d2a7e7666ff2b3ca98.tar.gz Essentials-a7aa8be37a1bd3e4432d39d2a7e7666ff2b3ca98.tar.lz Essentials-a7aa8be37a1bd3e4432d39d2a7e7666ff2b3ca98.tar.xz Essentials-a7aa8be37a1bd3e4432d39d2a7e7666ff2b3ca98.zip |
Prevent GM commands from being used on CommandBlocks.
Diffstat (limited to 'EssentialsGroupManager/src/org/anjocaido/groupmanager')
-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) { |