diff --git a/changelog.md b/changelog.md index 17b45fa..33f3449 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,7 @@ # Unreleased +- Fix command description + # 3.1.0 - Add ``enableEverySecondsCooldownMessage``, Periodically displays a message when the koth is launched diff --git a/src/fr/maxlego08/koth/command/commands/CommandKothAddCommand.java b/src/fr/maxlego08/koth/command/commands/CommandKothAddCommand.java index 611c519..6e793ab 100644 --- a/src/fr/maxlego08/koth/command/commands/CommandKothAddCommand.java +++ b/src/fr/maxlego08/koth/command/commands/CommandKothAddCommand.java @@ -14,7 +14,7 @@ public class CommandKothAddCommand extends VCommand { super(plugin); this.setPermission(Permission.ZKOTH_COMMAND_ADD); this.addSubCommand("addcommand", "ac"); - this.setDescription(Message.DESCRIPTION_SPAWN); + this.setDescription(Message.DESCRIPTION_ADD_COMMAND); this.addRequireArg("name", (a, b) -> plugin.getKothManager().getNameKoths()); this.addRequireArg("type", (a, b) -> Arrays.asList("start", "win")); this.addRequireArg("command"); diff --git a/src/fr/maxlego08/koth/command/commands/CommandKothDelete.java b/src/fr/maxlego08/koth/command/commands/CommandKothDelete.java index 9499481..4523d47 100644 --- a/src/fr/maxlego08/koth/command/commands/CommandKothDelete.java +++ b/src/fr/maxlego08/koth/command/commands/CommandKothDelete.java @@ -12,7 +12,7 @@ public class CommandKothDelete extends VCommand { super(plugin); this.setPermission(Permission.ZKOTH_DELETE); this.addSubCommand("spawn"); - this.setDescription(Message.DESCRIPTION_SPAWN); + this.setDescription(Message.DESCRIPTION_DELETE); this.addRequireArg("name", (a,b) -> plugin.getKothManager().getNameKoths()); } diff --git a/src/fr/maxlego08/koth/command/commands/CommandKothLoot.java b/src/fr/maxlego08/koth/command/commands/CommandKothLoot.java index e1fac00..d635c14 100644 --- a/src/fr/maxlego08/koth/command/commands/CommandKothLoot.java +++ b/src/fr/maxlego08/koth/command/commands/CommandKothLoot.java @@ -14,7 +14,7 @@ public class CommandKothLoot extends VCommand { super(plugin); this.setPermission(Permission.ZKOTH_LOOT); this.addSubCommand("loot"); - this.setDescription(Message.DESCRIPTION_SPAWN); + this.setDescription(Message.DESCRIPTION_LOOT); this.addRequireArg("name", (a, b) -> plugin.getKothManager().getNameKoths()); this.addOptionalArg("page", (a, b) -> Arrays.asList("1", "2", "3", "4", "5", "6", "7", "8", "9")); } diff --git a/src/fr/maxlego08/koth/command/commands/CommandKothVersion.java b/src/fr/maxlego08/koth/command/commands/CommandKothVersion.java index 3faf940..9b1708d 100644 --- a/src/fr/maxlego08/koth/command/commands/CommandKothVersion.java +++ b/src/fr/maxlego08/koth/command/commands/CommandKothVersion.java @@ -3,27 +3,26 @@ package fr.maxlego08.koth.command.commands; import fr.maxlego08.koth.KothPlugin; import fr.maxlego08.koth.command.VCommand; import fr.maxlego08.koth.zcore.enums.Message; -import fr.maxlego08.koth.zcore.enums.Permission; import fr.maxlego08.koth.zcore.utils.commands.CommandType; public class CommandKothVersion extends VCommand { - public CommandKothVersion(KothPlugin plugin) { - super(plugin); - this.addSubCommand("version", "?", "v"); - this.setDescription(Message.DESCRIPTION_SPAWN); - } + public CommandKothVersion(KothPlugin plugin) { + super(plugin); + this.addSubCommand("version", "?", "v"); + this.setDescription(Message.DESCRIPTION_VERSION); + } - @Override - protected CommandType perform(KothPlugin plugin) { + @Override + protected CommandType perform(KothPlugin plugin) { - message(this.sender, "§aVersion du plugin§7: §2" + plugin.getDescription().getVersion()); - message(this.sender, "§aAuteur§7: §2Maxlego08"); - message(this.sender, "§aDiscord§7: §2http://discord.groupez.dev/"); - message(this.sender, "§aBuy it for §d8€§7: §2https://groupez.dev/resources/zKoth.9"); - message(this.sender, "§aSponsor§7: §chttps://serveur-minecraft-vote.fr/?ref=345"); - - return CommandType.SUCCESS; - } + message(this.sender, "§aVersion du plugin§7: §2" + plugin.getDescription().getVersion()); + message(this.sender, "§aAuteur§7: §2Maxlego08"); + message(this.sender, "§aDiscord§7: §2http://discord.groupez.dev/"); + message(this.sender, "§aBuy it for §d8€§7: §2https://groupez.dev/resources/zKoth.9"); + message(this.sender, "§aSponsor§7: §chttps://serveur-minecraft-vote.fr/?ref=345"); + + return CommandType.SUCCESS; + } } diff --git a/src/fr/maxlego08/koth/zcore/enums/Message.java b/src/fr/maxlego08/koth/zcore/enums/Message.java index 7229b3a..24cdcd2 100644 --- a/src/fr/maxlego08/koth/zcore/enums/Message.java +++ b/src/fr/maxlego08/koth/zcore/enums/Message.java @@ -53,6 +53,7 @@ public enum Message { DESCRIPTION_AXE("Getting the selection axe"), DESCRIPTION_CREATE("Create new koth"), DESCRIPTION_LIST("Get koth list"), + DESCRIPTION_ADD_COMMAND("Add a command to a koth"), AXE_RECEIVE("§7You have just received the axe for zone selection."), AXE_NAME("§6✤ §7zKoth axe §6✤"),