mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-12 04:20:41 +00:00
add allow commandblock check
This commit is contained in:
parent
623ff0f629
commit
4167dd2590
1 changed files with 3 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue