diff --git a/src/main/java/com/songoda/ultimatekits/UltimateKits.java b/src/main/java/com/songoda/ultimatekits/UltimateKits.java index 52b1e43..3483587 100644 --- a/src/main/java/com/songoda/ultimatekits/UltimateKits.java +++ b/src/main/java/com/songoda/ultimatekits/UltimateKits.java @@ -129,7 +129,7 @@ public class UltimateKits extends SongodaPlugin { this.commandManager = new CommandManager(this); this.commandManager.addCommand(new CommandKit(guiManager)); this.commandManager.addCommand(new CommandPreviewKit(guiManager)); - this.commandManager.addCommand(new CommandUltimateKits()) + this.commandManager.addMainCommand("KitAdmin") .addSubCommand(new CommandReload()) .addSubCommand(new CommandSettings(guiManager)) .addSubCommand(new CommandCreatekit(guiManager)) diff --git a/src/main/java/com/songoda/ultimatekits/commands/CommandCategories.java b/src/main/java/com/songoda/ultimatekits/commands/CommandCategories.java index d3b1a55..4e3daea 100644 --- a/src/main/java/com/songoda/ultimatekits/commands/CommandCategories.java +++ b/src/main/java/com/songoda/ultimatekits/commands/CommandCategories.java @@ -40,7 +40,7 @@ public class CommandCategories extends AbstractCommand { @Override public String getSyntax() { - return "/KitAdmin categories"; + return "categories"; } @Override diff --git a/src/main/java/com/songoda/ultimatekits/commands/CommandCrate.java b/src/main/java/com/songoda/ultimatekits/commands/CommandCrate.java index 573e545..23baadb 100644 --- a/src/main/java/com/songoda/ultimatekits/commands/CommandCrate.java +++ b/src/main/java/com/songoda/ultimatekits/commands/CommandCrate.java @@ -122,7 +122,7 @@ public class CommandCrate extends AbstractCommand { @Override public String getSyntax() { - return "/KitAdmin crate (amount)"; + return "crate (amount)"; } @Override diff --git a/src/main/java/com/songoda/ultimatekits/commands/CommandCreatekit.java b/src/main/java/com/songoda/ultimatekits/commands/CommandCreatekit.java index d6f94d0..f6fc36a 100644 --- a/src/main/java/com/songoda/ultimatekits/commands/CommandCreatekit.java +++ b/src/main/java/com/songoda/ultimatekits/commands/CommandCreatekit.java @@ -52,7 +52,7 @@ public class CommandCreatekit extends AbstractCommand { @Override public String getSyntax() { - return "/KitAdmin createkit "; + return "createkit "; } @Override diff --git a/src/main/java/com/songoda/ultimatekits/commands/CommandEdit.java b/src/main/java/com/songoda/ultimatekits/commands/CommandEdit.java index ddc7272..8a06787 100644 --- a/src/main/java/com/songoda/ultimatekits/commands/CommandEdit.java +++ b/src/main/java/com/songoda/ultimatekits/commands/CommandEdit.java @@ -67,7 +67,7 @@ public class CommandEdit extends AbstractCommand { @Override public String getSyntax() { - return "/KitAdmin edit "; + return "edit "; } @Override diff --git a/src/main/java/com/songoda/ultimatekits/commands/CommandKey.java b/src/main/java/com/songoda/ultimatekits/commands/CommandKey.java index 393905e..584e7d2 100644 --- a/src/main/java/com/songoda/ultimatekits/commands/CommandKey.java +++ b/src/main/java/com/songoda/ultimatekits/commands/CommandKey.java @@ -108,7 +108,7 @@ public class CommandKey extends AbstractCommand { for (Key key : UltimateKits.getInstance().getKeyManager().getKeys()) { keys.append("/").append(key.getName()); } - return "/KitAdmin key <" + keys.substring(1) + "> "; + return "key <" + keys.substring(1) + "> "; } @Override diff --git a/src/main/java/com/songoda/ultimatekits/commands/CommandReload.java b/src/main/java/com/songoda/ultimatekits/commands/CommandReload.java index 537eb2d..f85c023 100644 --- a/src/main/java/com/songoda/ultimatekits/commands/CommandReload.java +++ b/src/main/java/com/songoda/ultimatekits/commands/CommandReload.java @@ -33,7 +33,7 @@ public class CommandReload extends AbstractCommand { @Override public String getSyntax() { - return "/KitAdmin reload"; + return "reload"; } @Override diff --git a/src/main/java/com/songoda/ultimatekits/commands/CommandRemove.java b/src/main/java/com/songoda/ultimatekits/commands/CommandRemove.java index 8af321e..c3e56f1 100644 --- a/src/main/java/com/songoda/ultimatekits/commands/CommandRemove.java +++ b/src/main/java/com/songoda/ultimatekits/commands/CommandRemove.java @@ -47,7 +47,7 @@ public class CommandRemove extends AbstractCommand { @Override public String getSyntax() { - return "/KitAdmin remove"; + return "remove"; } @Override diff --git a/src/main/java/com/songoda/ultimatekits/commands/CommandSet.java b/src/main/java/com/songoda/ultimatekits/commands/CommandSet.java index 9fb7d98..5866d07 100644 --- a/src/main/java/com/songoda/ultimatekits/commands/CommandSet.java +++ b/src/main/java/com/songoda/ultimatekits/commands/CommandSet.java @@ -63,7 +63,7 @@ public class CommandSet extends AbstractCommand { @Override public String getSyntax() { - return "/KitAdmin set "; + return "set "; } @Override diff --git a/src/main/java/com/songoda/ultimatekits/commands/CommandSettings.java b/src/main/java/com/songoda/ultimatekits/commands/CommandSettings.java index b98781d..669520f 100644 --- a/src/main/java/com/songoda/ultimatekits/commands/CommandSettings.java +++ b/src/main/java/com/songoda/ultimatekits/commands/CommandSettings.java @@ -38,7 +38,7 @@ public class CommandSettings extends AbstractCommand { @Override public String getSyntax() { - return "/KitAdmin settings"; + return "settings"; } @Override diff --git a/src/main/java/com/songoda/ultimatekits/commands/CommandUltimateKits.java b/src/main/java/com/songoda/ultimatekits/commands/CommandUltimateKits.java deleted file mode 100644 index f898667..0000000 --- a/src/main/java/com/songoda/ultimatekits/commands/CommandUltimateKits.java +++ /dev/null @@ -1,54 +0,0 @@ -package com.songoda.ultimatekits.commands; - -import com.songoda.core.commands.AbstractCommand; -import com.songoda.ultimatekits.UltimateKits; -import org.bukkit.command.CommandSender; -import org.bukkit.ChatColor; - -import java.util.ArrayList; -import java.util.List; - -public class CommandUltimateKits extends AbstractCommand { - - final UltimateKits instance = UltimateKits.getInstance(); - - public CommandUltimateKits() { - super(false, "KitAdmin"); - } - - @Override - protected AbstractCommand.ReturnType runCommand(CommandSender sender, String... args) { - sender.sendMessage(""); - instance.getLocale().newMessage("&7Version " + instance.getDescription().getVersion() - + " Created with <3 by &5&l&oSongoda").sendPrefixedMessage(sender); - - for (AbstractCommand command : instance.getCommandManager().getAllCommands()) { - if (command.getPermissionNode() == null || sender.hasPermission(command.getPermissionNode())) { - sender.sendMessage(ChatColor.translateAlternateColorCodes('&', "&8 - &a" + command.getSyntax() + "&7 - " + command.getDescription())); - } - } - sender.sendMessage(""); - - return ReturnType.SUCCESS; - } - - @Override - protected List onTab(CommandSender sender, String... args) { - return new ArrayList<>(); - } - - @Override - public String getPermissionNode() { - return null; - } - - @Override - public String getSyntax() { - return "/KitAdmin"; - } - - @Override - public String getDescription() { - return "Displays this page."; - } -}