mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-11 00:55:10 +02:00
Prevent GM commands from being used on CommandBlocks.
This commit is contained in:
@@ -203,3 +203,4 @@ v 2.0:
|
||||
- Add alphabetically sorted user lists.
|
||||
- allWorldsDataList now returns fully mirrored worlds which are not identical mirrors (fixes the /manselect list).
|
||||
- Add support for Rcon.
|
||||
- Prevent GM commands from being used on CommandBlocks.
|
@@ -382,6 +382,12 @@ public class GroupManager extends JavaPlugin {
|
||||
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) {
|
||||
senderPlayer = (Player) sender;
|
||||
|
Reference in New Issue
Block a user