1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-17 12:01:20 +02:00

add allow commandblock check

This commit is contained in:
Necrodoom
2013-01-30 18:53:40 +02:00
parent 9902cb4a09
commit d0e4fe0469

View File

@@ -387,10 +387,11 @@ public class GroupManager extends JavaPlugin {
Group senderGroup = null;
User senderUser = null;
boolean isOpOverride = config.isOpOverride();
boolean isAllowCommandBlocks = config.isAllowCommandBlocks();
// PREVENT GM COMMANDS BEING USED ON COMMANDBLOCKS
if (sender instanceof BlockCommandSender) {
sender.sendMessage(ChatColor.RED + "GM Commands can not be called from CommandBlocks");
if (sender instanceof BlockCommandSender && !isAllowCommandBlocks) {
console.sendMessage(ChatColor.RED + "GM Commands can not be called from CommandBlocks");
return true;
}