diff --git a/src/main/java/com/onarandombox/MultiverseCore/commands/SubModulesCommand.java b/src/main/java/com/onarandombox/MultiverseCore/commands/SubModulesCommand.java index bec50b98..f4436c4e 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/commands/SubModulesCommand.java +++ b/src/main/java/com/onarandombox/MultiverseCore/commands/SubModulesCommand.java @@ -1,9 +1,11 @@ package com.onarandombox.MultiverseCore.commands; import co.aikar.commands.BaseCommand; +import co.aikar.commands.CommandHelp; import co.aikar.commands.annotation.CommandAlias; import co.aikar.commands.annotation.CommandPermission; import co.aikar.commands.annotation.Description; +import co.aikar.commands.annotation.HelpCommand; import com.onarandombox.MultiverseCore.commandTools.display.ColourAlternator; import org.bukkit.ChatColor; import org.bukkit.command.CommandSender; @@ -12,10 +14,14 @@ import org.jetbrains.annotations.NotNull; public class SubModulesCommand { public static class NetherPortals extends BaseCommand { + + @HelpCommand @CommandAlias("mvnp") @CommandPermission("multiverse.core.submodules") @Description("Suggest download for Multiverse-NetherPortals.") - public void onSuggestCommand(@NotNull CommandSender sender) { + public void onSuggestCommand(@NotNull CommandSender sender, + @NotNull CommandHelp help) { + suggestDownload( sender, "Multiverse-NetherPortals", @@ -26,10 +32,14 @@ public class SubModulesCommand { } public static class Portals extends BaseCommand { + + @HelpCommand @CommandAlias("mvp") @CommandPermission("multiverse.core.submodules") @Description("Suggest download for Multiverse-Portals.") - public void onSuggestCommand(@NotNull CommandSender sender) { + public void onSuggestCommand(@NotNull CommandSender sender, + @NotNull CommandHelp help) { + suggestDownload( sender, "Multiverse-Portals", @@ -40,10 +50,14 @@ public class SubModulesCommand { } public static class Inventories extends BaseCommand { + + @HelpCommand @CommandAlias("mvinv") @CommandPermission("multiverse.core.submodules") @Description("Suggest download for Multiverse-Inventories.") - public void onSuggestCommand(@NotNull CommandSender sender) { + public void onSuggestCommand(@NotNull CommandSender sender, + @NotNull CommandHelp help) { + suggestDownload( sender, "Multiverse-Inventories", @@ -54,9 +68,9 @@ public class SubModulesCommand { } private static void suggestDownload(@NotNull CommandSender sender, - @NotNull String pluginName, - @NotNull ColourAlternator colours, - @NotNull String downloadLink) { + @NotNull String pluginName, + @NotNull ColourAlternator colours, + @NotNull String downloadLink) { sender.sendMessage(colours.getColorThis() + pluginName + ChatColor.WHITE + " is not installed on this server. You can learn more and download it at:");