mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-23 09:37:50 +01:00
add allow commandblock check
This commit is contained in:
parent
623ff0f629
commit
4167dd2590
@ -387,10 +387,11 @@ public class GroupManager extends JavaPlugin {
|
|||||||
Group senderGroup = null;
|
Group senderGroup = null;
|
||||||
User senderUser = null;
|
User senderUser = null;
|
||||||
boolean isOpOverride = config.isOpOverride();
|
boolean isOpOverride = config.isOpOverride();
|
||||||
|
boolean isAllowCommandBlocks = config.isAllowCommandBlocks();
|
||||||
|
|
||||||
// PREVENT GM COMMANDS BEING USED ON COMMANDBLOCKS
|
// PREVENT GM COMMANDS BEING USED ON COMMANDBLOCKS
|
||||||
if (sender instanceof BlockCommandSender) {
|
if (sender instanceof BlockCommandSender && !isAllowCommandBlocks) {
|
||||||
sender.sendMessage(ChatColor.RED + "GM Commands can not be called from CommandBlocks");
|
console.sendMessage(ChatColor.RED + "GM Commands can not be called from CommandBlocks");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user