Prevent GM commands from being used on CommandBlocks.

This commit is contained in:
ElgarL 2012-11-11 20:56:07 +00:00
parent 237c896fff
commit a7aa8be37a
2 changed files with 8 additions and 1 deletions

View File

@ -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.
- Add support for Rcon.
- Prevent GM commands from being used on CommandBlocks.

View File

@ -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) {