mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-06-06 14:29:44 +00:00
Prevent GM commands from being used on CommandBlocks.
This commit is contained in:
parent
237c896fff
commit
a7aa8be37a
2 changed files with 8 additions and 1 deletions
|
@ -203,3 +203,4 @@ v 2.0:
|
||||||
- Add alphabetically sorted user lists.
|
- Add alphabetically sorted user lists.
|
||||||
- allWorldsDataList now returns fully mirrored worlds which are not identical mirrors (fixes the /manselect list).
|
- 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.
|
|
@ -382,6 +382,12 @@ public class GroupManager extends JavaPlugin {
|
||||||
User senderUser = null;
|
User senderUser = null;
|
||||||
boolean isOpOverride = config.isOpOverride();
|
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
|
// DETERMINING PLAYER INFORMATION
|
||||||
if (sender instanceof Player) {
|
if (sender instanceof Player) {
|
||||||
senderPlayer = (Player) sender;
|
senderPlayer = (Player) sender;
|
||||||
|
|
Loading…
Reference in a new issue