mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-09 08:06:54 +02:00
Prevent GM commands from being used on CommandBlocks.
This commit is contained in:
@@ -202,4 +202,5 @@ v 2.0:
|
||||
- Change order of data in Users.yml to [name, Group, SubGroup, Permissions, Info nodes].
|
||||
- Add alphabetically sorted user lists.
|
||||
- allWorldsDataList now returns fully mirrored worlds which are not identical mirrors (fixes the /manselect list).
|
||||
- Add support for Rcon.
|
||||
- Add support for Rcon.
|
||||
- Prevent GM commands from being used on CommandBlocks.
|
@@ -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) {
|
||||
|
Reference in New Issue
Block a user