1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-09-26 06:09:15 +02:00

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

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