Message added to the '/gui-item' command if this function is disabled

pull/1/head
JaTiTV 5 months ago
parent
commit
f734748df8
  1. 6
      CommandGUI V2/src/main/java/de/jatitv/commandguiv2/Spigot/cmdManagement/CmdExecuter_GUIItem.java

6
CommandGUI V2/src/main/java/de/jatitv/commandguiv2/Spigot/cmdManagement/CmdExecuter_GUIItem.java

@ -23,7 +23,9 @@ public class CmdExecuter_GUIItem implements CommandExecutor, TabCompleter { @@ -23,7 +23,9 @@ public class CmdExecuter_GUIItem implements CommandExecutor, TabCompleter {
Player player = (Player) sender;
if (sender.hasPermission("commandgui.useitem.toggle")) {
if (args.length == 0) {
Help.sendGUIItemHelp(sender, prefix);
if (SelectConfig.UseItem_AllowToggle) {
Help.sendGUIItemHelp(sender, prefix);
} else send.sender(sender, "§4UseItem toggle is disabled!");// todo
} else {
if (args.length == 1 || args.length == 2) {
if (sender instanceof Player) {
@ -50,7 +52,7 @@ public class CmdExecuter_GUIItem implements CommandExecutor, TabCompleter { @@ -50,7 +52,7 @@ public class CmdExecuter_GUIItem implements CommandExecutor, TabCompleter {
Help.sendHelp(player, prefix);
}
}
} else send.sender(sender, "§4UseItem toggle is disabled!");// todo
} else sender.sendMessage(SelectMessages.OnlyForPlayer);
}
}

Loading…
Cancel
Save