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 | |
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')
-rw-r--r-- | EssentialsGroupManager/src/Changelog.txt | 3 | ||||
-rw-r--r-- | EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java | 6 |
2 files changed, 8 insertions, 1 deletions
diff --git a/EssentialsGroupManager/src/Changelog.txt b/EssentialsGroupManager/src/Changelog.txt index d11911c18..4ea195a5d 100644 --- a/EssentialsGroupManager/src/Changelog.txt +++ b/EssentialsGroupManager/src/Changelog.txt @@ -202,4 +202,5 @@ v 2.0: - Change order of data in Users.yml to [name, Group, SubGroup, Permissions, Info nodes].
- Add alphabetically sorted user lists.
- allWorldsDataList now returns fully mirrored worlds which are not identical mirrors (fixes the /manselect list).
- - Add support for Rcon.
\ No newline at end of file + - Add support for Rcon.
+ - Prevent GM commands from being used on CommandBlocks.
\ No newline at end of file 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) { |