summaryrefslogtreecommitdiffstats
path: root/EssentialsGroupManager
diff options
context:
space:
mode:
authorAlexander Schepp <schneeleo@gmail.com>2012-10-31 19:44:13 +0100
committerAlexander Schepp <schneeleo@gmail.com>2012-10-31 19:44:13 +0100
commit1c25d317dd6ae0e41c843c6c185f5b6eb0dfaf4d (patch)
treec4169d947f1833cc575f44ec1ee421f18c583545 /EssentialsGroupManager
parent651a62890a82eb51bb62f99e14ad7230914b01bf (diff)
downloadEssentials-1c25d317dd6ae0e41c843c6c185f5b6eb0dfaf4d.tar
Essentials-1c25d317dd6ae0e41c843c6c185f5b6eb0dfaf4d.tar.gz
Essentials-1c25d317dd6ae0e41c843c6c185f5b6eb0dfaf4d.tar.lz
Essentials-1c25d317dd6ae0e41c843c6c185f5b6eb0dfaf4d.tar.xz
Essentials-1c25d317dd6ae0e41c843c6c185f5b6eb0dfaf4d.zip
Quickfix to prevent GM commands from being called by BlockCommandSender.
Diffstat (limited to 'EssentialsGroupManager')
-rw-r--r--EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java
index ee1130483..a971dec88 100644
--- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java
+++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java
@@ -381,6 +381,11 @@ public class GroupManager extends JavaPlugin {
User senderUser = null;
boolean isOpOverride = config.isOpOverride();
+ 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) {
senderPlayer = (Player) sender;