diff --git a/src/main/java/snw/kookbc/impl/command/litecommands/KookLitePlatform.java b/src/main/java/snw/kookbc/impl/command/litecommands/KookLitePlatform.java index 4c50b1b1..f3c41551 100644 --- a/src/main/java/snw/kookbc/impl/command/litecommands/KookLitePlatform.java +++ b/src/main/java/snw/kookbc/impl/command/litecommands/KookLitePlatform.java @@ -52,15 +52,16 @@ protected KookLitePlatform(@NotNull LiteKookSettings settings, Plugin plugin, Co @Override protected void hook(CommandRoute commandRoute, PlatformInvocationListener platformInvocationListener, PlatformSuggestionListener platformSuggestionListener) { - for (String label : commandRoute.names()) { - List desc = commandRoute.meta().get(Meta.DESCRIPTION); - Set prefixes = commandRoute.meta().get(PREFIX); - // List perms = commandRoute.meta().get(Meta.PERMISSIONS); - JKookCommand command = new JKookCommand(label, prefixes) - .setDescription(String.join("\n", desc)) - .setExecutor(new LiteKookCommandExecutor(plugin.getCore(), settings, commandRoute, label, platformInvocationListener, platformSuggestionListener)); - commandMap.register(plugin, command); + List desc = commandRoute.meta().get(Meta.DESCRIPTION); + Set prefixes = commandRoute.meta().get(PREFIX); + // List perms = commandRoute.meta().get(Meta.PERMISSIONS); + JKookCommand command = new JKookCommand(commandRoute.getName(), prefixes) + .setDescription(String.join("\n", desc)) + .setExecutor(new LiteKookCommandExecutor(plugin.getCore(), settings, commandRoute, commandRoute.getName(), platformInvocationListener, platformSuggestionListener)); + for (String alias : commandRoute.getAliases()) { + command.addAlias(alias); } + commandMap.register(plugin, command); } @Override