- /commandgui [gui] did not work, this has been fixed
- small channges
This commit is contained in:
JaTiTV 2021-12-22 19:47:35 +01:00
parent e0da2cd88d
commit 75b4a323c5

View File

@ -30,16 +30,19 @@ public class CmdExecuter_GUI implements CommandExecutor, TabCompleter {
}
Player player = (Player) sender;
Commands.gui(player);
} else {
if (args[0].equals("admin")) {
if (args.length == 1) {
Help.sendHelp(sender, prefix);
return false;
}
switch (args[1].toLowerCase()) {
case "info":
if (sender.hasPermission("commandgui.command.info")) {
Commands.info(sender);
} else sender.sendMessage(SelectMessages.NoPermissionForCommand
.replace("[cmd]", "/commandgui admin").replace("[perm]", "commandgui.command.info"));
break;
case "reload":
case "rl":
@ -86,10 +89,15 @@ public class CmdExecuter_GUI implements CommandExecutor, TabCompleter {
default:
Help.sendHelp(sender, prefix);
break;
}
} else Help.sendHelp(sender, prefix);
} else {
if (sender instanceof Player) {
Player player = (Player) sender;
Commands.gui(player, args[0]);
return false;
}
Help.sendHelp(sender, prefix);
}
}
return false;