From 35c675cd44899bb687bf8df1264168d58a71b957 Mon Sep 17 00:00:00 2001 From: Archy-X <63976867+Archy-X@users.noreply.github.com> Date: Fri, 4 Oct 2024 02:54:26 -0400 Subject: [PATCH] Add localization for command descriptions --- .../bukkit/commands/AntiAfkCommand.java | 1 + .../bukkit/commands/ArmorCommand.java | 32 ++--- .../bukkit/commands/BackupCommand.java | 3 + .../bukkit/commands/CommandRegistrar.java | 19 ++- .../bukkit/commands/ItemCommand.java | 43 +++--- .../bukkit/commands/JobsCommand.java | 3 + .../bukkit/commands/ManaAbilityCommand.java | 4 +- .../bukkit/commands/ModifierCommand.java | 8 +- .../bukkit/commands/OpenMenuCommand.java | 1 + .../bukkit/commands/PresetCommand.java | 2 + .../bukkit/commands/ProfileCommand.java | 15 +- .../bukkit/commands/ReloadExecutor.java | 2 +- .../bukkit/commands/SkillCommand.java | 6 +- .../bukkit/commands/SkillsRootCommand.java | 20 +-- .../bukkit/commands/StatsCommand.java | 2 +- .../bukkit/commands/TraitCommand.java | 8 +- .../auraskills/bukkit/commands/XpCommand.java | 14 +- .../auraskills/common/commands/Command.java | 24 +++- .../common/commands/ManaCommand.java | 14 +- .../common/message/MessageProvider.java | 2 + .../common/message/MessageUpdates.java | 54 ++++++++ .../common/message/type/CommandMessage.java | 28 ++-- .../main/resources/messages/messages_en.yml | 131 ++++++++++++++++-- 23 files changed, 316 insertions(+), 120 deletions(-) create mode 100644 common/src/main/java/dev/aurelium/auraskills/common/message/MessageUpdates.java diff --git a/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/commands/AntiAfkCommand.java b/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/commands/AntiAfkCommand.java index 455465362..140588c28 100644 --- a/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/commands/AntiAfkCommand.java +++ b/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/commands/AntiAfkCommand.java @@ -37,6 +37,7 @@ public AntiAfkCommand(AuraSkills plugin) { @CommandPermission("auraskills.command.antiafk.logs") @CommandCompletion("@players") @SuppressWarnings("deprecation") + @Description("%desc_antiafk_logs") public void onLogs(CommandSender sender, @Flags("other") String player, @Default("1") @Conditions("limits:min=1") Integer page, diff --git a/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/commands/ArmorCommand.java b/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/commands/ArmorCommand.java index 779e38b46..e1ba33262 100644 --- a/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/commands/ArmorCommand.java +++ b/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/commands/ArmorCommand.java @@ -38,7 +38,7 @@ public ArmorCommand(AuraSkills plugin) { @Subcommand("modifier add") @CommandCompletion("@stats @nothing false|true") @CommandPermission("auraskills.command.armor.modifier") - @Description("Adds an armor stat modifier to the item held, along with lore by default.") + @Description("%desc_armor_modifier_add") public void onArmorModifierAdd(@Flags("itemheld") Player player, Stat stat, double value, @Default("true") boolean lore) { Locale locale = plugin.getUser(player).getLocale(); ItemStack item = player.getInventory().getItemInMainHand(); @@ -62,7 +62,7 @@ public void onArmorModifierAdd(@Flags("itemheld") Player player, Stat stat, doub @Subcommand("modifier remove") @CommandCompletion("@stats false|true") @CommandPermission("auraskills.command.armor.modifier") - @Description("Removes an armor stat modifier from the item held, and the lore associated with it by default.") + @Description("%desc_armor_modifier_remove") public void onArmorModifierRemove(@Flags("itemheld") Player player, Stat stat, @Default("true") boolean lore) { Locale locale = plugin.getUser(player).getLocale(); ItemStack item = player.getInventory().getItemInMainHand(); @@ -90,7 +90,7 @@ public void onArmorModifierRemove(@Flags("itemheld") Player player, Stat stat, @ @Subcommand("modifier list") @CommandPermission("auraskills.command.armor.modifier") - @Description("Lists all armor stat modifiers on the item held.") + @Description("%desc_armor_modifier_list") public void onArmorModifierList(@Flags("itemheld") Player player) { Locale locale = plugin.getUser(player).getLocale(); ItemStack item = player.getInventory().getItemInMainHand(); @@ -104,7 +104,7 @@ public void onArmorModifierList(@Flags("itemheld") Player player) { @Subcommand("modifier removeall") @CommandPermission("auraskills.command.armor.modifier") - @Description("Removes all armor stat modifiers from the item held.") + @Description("%desc_armor_modifier_removeall") public void onArmorModifierRemoveAll(@Flags("itemheld") Player player) { Locale locale = plugin.getUser(player).getLocale(); SkillsItem skillsItem = new SkillsItem(player.getInventory().getItemInMainHand(), plugin); @@ -117,7 +117,7 @@ public void onArmorModifierRemoveAll(@Flags("itemheld") Player player) { @Subcommand("trait add") @CommandCompletion("@traits @nothing false|true") @CommandPermission("auraskills.command.armor.modifier") - @Description("Adds an armor trait modifier to the item held, along with lore by default.") + @Description("%desc_armor_trait_add") public void onItemTraitAdd(@Flags("itemheld") Player player, Trait trait, double value, @Default("true") boolean lore) { Locale locale = plugin.getUser(player).getLocale(); ItemStack item = player.getInventory().getItemInMainHand(); @@ -142,7 +142,7 @@ public void onItemTraitAdd(@Flags("itemheld") Player player, Trait trait, double @Subcommand("trait remove") @CommandCompletion("@traits") @CommandPermission("auraskills.command.armor.modifier") - @Description("Removes an armor trait modifier from the item held.") + @Description("%desc_armor_trait_remove") public void onItemTraitRemove(@Flags("itemheld") Player player, Trait trait) { Locale locale = plugin.getUser(player).getLocale(); ItemStack item = player.getInventory().getItemInMainHand(); @@ -167,7 +167,7 @@ public void onItemTraitRemove(@Flags("itemheld") Player player, Trait trait) { @Subcommand("trait list") @CommandPermission("auraskills.command.armor.modifier") - @Description("Lists all item trait modifiers on the item held.") + @Description("%desc_armor_trait_list") public void onItemTraitList(@Flags("itemheld") Player player) { Locale locale = plugin.getUser(player).getLocale(); ItemStack item = player.getInventory().getItemInMainHand(); @@ -181,7 +181,7 @@ public void onItemTraitList(@Flags("itemheld") Player player) { @Subcommand("trait removeall") @CommandPermission("auraskills.command.armor.modifier") - @Description("Removes all armor trait modifiers from the item held.") + @Description("%desc_armor_trait_removeall") public void onItemTraitRemoveAll(@Flags("itemheld") Player player) { Locale locale = plugin.getUser(player).getLocale(); @@ -198,7 +198,7 @@ public void onItemTraitRemoveAll(@Flags("itemheld") Player player) { @Subcommand("requirement add") @CommandPermission("auraskills.command.armor.requirement") @CommandCompletion("@skills @nothing false|true") - @Description("Adds an armor requirement to the item held, along with lore by default") + @Description("%desc_armor_requirement_add") public void onArmorRequirementAdd(@Flags("itemheld") Player player, Skill skill, int level, @Default("true") boolean lore) { Locale locale = plugin.getUser(player).getLocale(); ItemStack item = player.getInventory().getItemInMainHand(); @@ -222,7 +222,7 @@ public void onArmorRequirementAdd(@Flags("itemheld") Player player, Skill skill, @Subcommand("requirement remove") @CommandPermission("auraskills.command.armor.requirement") @CommandCompletion("@skills false|true") - @Description("Removes an armor requirement from the item held, along with the lore associated it by default.") + @Description("%desc_armor_requirement_remove") public void onArmorRequirementRemove(@Flags("itemheld") Player player, Skill skill, @Default("true") boolean lore) { Locale locale = plugin.getUser(player).getLocale(); ItemStack item = player.getInventory().getItemInMainHand(); @@ -245,7 +245,7 @@ public void onArmorRequirementRemove(@Flags("itemheld") Player player, Skill ski @Subcommand("requirement list") @CommandPermission("auraskills.command.armor.requirement") - @Description("Lists the armor requirements on the item held.") + @Description("%desc_armor_requirement_list") public void onArmorRequirementList(@Flags("itemheld") Player player) { Locale locale = plugin.getUser(player).getLocale(); player.sendMessage(plugin.getMsg(CommandMessage.ARMOR_REQUIREMENT_LIST_HEADER, locale)); @@ -259,7 +259,7 @@ public void onArmorRequirementList(@Flags("itemheld") Player player) { @Subcommand("requirement removeall") @CommandPermission("auraskills.command.armor.requirement") - @Description("Removes all armor requirements from the item held.") + @Description("%desc_armor_requirement_removeall") public void onArmorRequirementRemoveAll(@Flags("itemheld") Player player) { Locale locale = plugin.getUser(player).getLocale(); SkillsItem skillsItem = new SkillsItem(player.getInventory().getItemInMainHand(), plugin); @@ -272,7 +272,7 @@ public void onArmorRequirementRemoveAll(@Flags("itemheld") Player player) { @Subcommand("multiplier add") @CommandCompletion("@skills_global @nothing true|false") @CommandPermission("auraskills.command.armor.multiplier") - @Description("Adds an armor multiplier to the held item to global or a specific skill where value is the percent more XP gained.") + @Description("%desc_armor_multiplier_add") public void onArmorMultiplierAdd(@Flags("itemheld") Player player, String target, double value, @Default("true") boolean lore) { ItemStack item = player.getInventory().getItemInMainHand(); Skill skill = plugin.getSkillRegistry().getOrNull(NamespacedId.fromDefault(target)); @@ -320,7 +320,7 @@ public void onArmorMultiplierAdd(@Flags("itemheld") Player player, String target @Subcommand("multiplier remove") @CommandCompletion("@skills_global") @CommandPermission("auraskills.command.armor.multiplier") - @Description("Removes an armor multiplier of a the specified skill or global from the held item.") + @Description("%desc_armor_multiplier_remove") public void onArmorMultiplierRemove(@Flags("itemheld") Player player, String target) { Locale locale = plugin.getUser(player).getLocale(); ItemStack item = player.getInventory().getItemInMainHand(); @@ -357,7 +357,7 @@ public void onArmorMultiplierRemove(@Flags("itemheld") Player player, String tar @Subcommand("multiplier list") @CommandPermission("auraskills.command.armor.multiplier") - @Description("Lists all armor multipliers on the held item.") + @Description("%desc_armor_multiplier_list") public void onArmorMultiplierList(@Flags("itemheld") Player player) { Locale locale = plugin.getUser(player).getLocale(); ItemStack item = player.getInventory().getItemInMainHand(); @@ -378,7 +378,7 @@ public void onArmorMultiplierList(@Flags("itemheld") Player player) { @Subcommand("multiplier removeall") @CommandPermission("auraskills.command.armor.multiplier") - @Description("Removes all armor multipliers from the item held.") + @Description("%desc_armor_multiplier_removeall") public void onArmorMultiplierRemoveAll(@Flags("itemheld") Player player) { Locale locale = plugin.getUser(player).getLocale(); SkillsItem skillsItem = new SkillsItem(player.getInventory().getItemInMainHand(), plugin); diff --git a/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/commands/BackupCommand.java b/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/commands/BackupCommand.java index 91f073203..4a2a2cc3e 100644 --- a/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/commands/BackupCommand.java +++ b/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/commands/BackupCommand.java @@ -4,6 +4,7 @@ import co.aikar.commands.CommandIssuer; import co.aikar.commands.annotation.CommandAlias; import co.aikar.commands.annotation.CommandPermission; +import co.aikar.commands.annotation.Description; import co.aikar.commands.annotation.Subcommand; import dev.aurelium.auraskills.bukkit.AuraSkills; import dev.aurelium.auraskills.common.message.MessageBuilder; @@ -27,6 +28,7 @@ public BackupCommand(AuraSkills plugin) { @Subcommand("save") @CommandPermission("auraskills.command.backup.save") + @Description("%desc_backup_save") public void onBackupSave(CommandIssuer issuer) { BackupProvider backupProvider = plugin.getBackupProvider(); if (backupProvider != null) { @@ -50,6 +52,7 @@ public void onBackupSave(CommandIssuer issuer) { @Subcommand("load") @CommandPermission("auraskills.command.backup.load") + @Description("%desc_backup_load") public void onBackupLoad(CommandIssuer issuer, String fileName) { StorageProvider storageProvider = plugin.getStorageProvider(); Locale locale = plugin.getLocale(issuer); diff --git a/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/commands/CommandRegistrar.java b/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/commands/CommandRegistrar.java index 78ee1a473..fc27ad38d 100644 --- a/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/commands/CommandRegistrar.java +++ b/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/commands/CommandRegistrar.java @@ -14,8 +14,10 @@ import dev.aurelium.auraskills.api.trait.Trait; import dev.aurelium.auraskills.bukkit.AuraSkills; import dev.aurelium.auraskills.bukkit.menus.SourcesMenu.SortType; +import dev.aurelium.auraskills.common.commands.Command; import dev.aurelium.auraskills.common.commands.ManaCommand; import dev.aurelium.auraskills.common.config.Option; +import dev.aurelium.auraskills.common.message.MessageKey; import dev.aurelium.auraskills.common.message.type.CommandMessage; import dev.aurelium.auraskills.common.user.User; import org.bukkit.Bukkit; @@ -35,8 +37,8 @@ public PaperCommandManager registerCommands() { var manager = new PaperCommandManager(plugin); manager.enableUnstableAPI("help"); manager.usePerIssuerLocale(true, false); - manager.getCommandReplacements().addReplacement("skills_alias", "skills|sk|skill"); + registerReplacements(manager); registerConditions(manager); registerContexts(manager); registerCompletions(manager); @@ -45,6 +47,21 @@ public PaperCommandManager registerCommands() { return manager; } + private void registerReplacements(PaperCommandManager manager) { + var replacements = manager.getCommandReplacements(); + replacements.addReplacement("skills_alias", "skills|sk|skill"); + // Add description replacements for each command + for (Command command : Command.values()) { + String lower = command.name().toLowerCase(Locale.ROOT); + String placeholder = "desc_" + lower; + + var messageKey = MessageKey.of("commands." + lower.replace("_", ".") + ".desc"); + String message = plugin.getMsg(messageKey, plugin.getDefaultLanguage()); + + replacements.addReplacement(placeholder, message); + } + } + private void registerConditions(PaperCommandManager manager) { manager.getCommandConditions().addCondition(Integer.class, "limits", (c, exec, value) -> { if (value == null) { diff --git a/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/commands/ItemCommand.java b/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/commands/ItemCommand.java index e2ab38566..cb9d31682 100644 --- a/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/commands/ItemCommand.java +++ b/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/commands/ItemCommand.java @@ -43,7 +43,7 @@ public ItemCommand(AuraSkills plugin) { @Subcommand("modifier add") @CommandCompletion("@stats @nothing false|true") @CommandPermission("auraskills.command.item.modifier") - @Description("Adds an item stat modifier to the item held, along with lore by default.") + @Description("%desc_item_modifier_add") public void onItemModifierAdd(@Flags("itemheld") Player player, Stat stat, double value, @Default("true") boolean lore) { Locale locale = plugin.getUser(player).getLocale(); ItemStack item = player.getInventory().getItemInMainHand(); @@ -67,7 +67,7 @@ public void onItemModifierAdd(@Flags("itemheld") Player player, Stat stat, doubl @Subcommand("modifier remove") @CommandCompletion("@stats false|true") @CommandPermission("auraskills.command.item.modifier") - @Description("Removes an item stat modifier from the item held, and the lore associated with it by default.") + @Description("%desc_item_modifier_remove") public void onItemModifierRemove(@Flags("itemheld") Player player, Stat stat, @Default("true") boolean lore) { Locale locale = plugin.getUser(player).getLocale(); ItemStack item = player.getInventory().getItemInMainHand(); @@ -94,7 +94,7 @@ public void onItemModifierRemove(@Flags("itemheld") Player player, Stat stat, @D @Subcommand("modifier list") @CommandPermission("auraskills.command.item.modifier") - @Description("Lists all item stat modifiers on the item held.") + @Description("%desc_item_modifer_list") public void onItemModifierList(@Flags("itemheld") Player player) { Locale locale = plugin.getUser(player).getLocale(); ItemStack item = player.getInventory().getItemInMainHand(); @@ -108,7 +108,7 @@ public void onItemModifierList(@Flags("itemheld") Player player) { @Subcommand("modifier removeall") @CommandPermission("auraskills.command.item.modifier") - @Description("Removes all item stat modifiers from the item held.") + @Description("%desc_item_modifier_removeall") public void onItemModifierRemoveAll(@Flags("itemheld") Player player) { Locale locale = plugin.getUser(player).getLocale(); @@ -125,7 +125,7 @@ public void onItemModifierRemoveAll(@Flags("itemheld") Player player) { @Subcommand("trait add") @CommandCompletion("@traits @nothing false|true") @CommandPermission("auraskills.command.item.modifier") - @Description("Adds an item trait modifier to the item held, along with lore by default.") + @Description("%desc_item_trait_add") public void onItemTraitAdd(@Flags("itemheld") Player player, Trait trait, double value, @Default("true") boolean lore) { Locale locale = plugin.getUser(player).getLocale(); ItemStack item = player.getInventory().getItemInMainHand(); @@ -150,7 +150,7 @@ public void onItemTraitAdd(@Flags("itemheld") Player player, Trait trait, double @Subcommand("trait remove") @CommandCompletion("@traits") @CommandPermission("auraskills.command.item.modifier") - @Description("Removes an item trait modifier from the item held.") + @Description("%desc_item_trait_remove") public void onItemTraitRemove(@Flags("itemheld") Player player, Trait trait) { Locale locale = plugin.getUser(player).getLocale(); ItemStack item = player.getInventory().getItemInMainHand(); @@ -175,7 +175,7 @@ public void onItemTraitRemove(@Flags("itemheld") Player player, Trait trait) { @Subcommand("trait list") @CommandPermission("auraskills.command.item.modifier") - @Description("Lists all item trait modifiers on the item held.") + @Description("%desc_item_trait_list") public void onItemTraitList(@Flags("itemheld") Player player) { Locale locale = plugin.getUser(player).getLocale(); ItemStack item = player.getInventory().getItemInMainHand(); @@ -189,7 +189,7 @@ public void onItemTraitList(@Flags("itemheld") Player player) { @Subcommand("trait removeall") @CommandPermission("auraskills.command.item.modifier") - @Description("Removes all item trait modifiers from the item held.") + @Description("%desc_item_trait_removeall") public void onItemTraitRemoveAll(@Flags("itemheld") Player player) { Locale locale = plugin.getUser(player).getLocale(); @@ -206,7 +206,7 @@ public void onItemTraitRemoveAll(@Flags("itemheld") Player player) { @Subcommand("requirement add") @CommandPermission("auraskills.command.item.requirement") @CommandCompletion("@skills @nothing false|true") - @Description("Adds an item requirement to the item held, along with lore by default.") + @Description("%desc_item_requirement_add") public void onItemRequirementAdd(@Flags("itemheld") Player player, Skill skill, int level, @Default("true") boolean lore) { Locale locale = plugin.getUser(player).getLocale(); ItemStack item = player.getInventory().getItemInMainHand(); @@ -231,7 +231,7 @@ public void onItemRequirementAdd(@Flags("itemheld") Player player, Skill skill, @Subcommand("requirement remove") @CommandPermission("auraskills.command.item.requirement") @CommandCompletion("@skills false|true") - @Description("Removes an item requirement from the item held, and the lore associated with it by default.") + @Description("%desc_item_requirement_remove") public void onItemRequirementRemove(@Flags("itemheld") Player player, Skill skill, @Default("true") boolean lore) { Locale locale = plugin.getUser(player).getLocale(); ItemStack item = player.getInventory().getItemInMainHand(); @@ -256,7 +256,7 @@ public void onItemRequirementRemove(@Flags("itemheld") Player player, Skill skil @Subcommand("requirement list") @CommandPermission("auraskills.command.item.requirement") - @Description("Lists the item requirements on the item held.") + @Description("%desc_item_requirement_list") public void onItemRequirementList(@Flags("itemheld") Player player) { Locale locale = plugin.getUser(player).getLocale(); player.sendMessage(plugin.getMsg(CommandMessage.ITEM_REQUIREMENT_LIST_HEADER, locale)); @@ -272,7 +272,7 @@ public void onItemRequirementList(@Flags("itemheld") Player player) { @Subcommand("requirement removeall") @CommandPermission("auraskills.command.item.requirement") - @Description("Removes all item requirements from the item held.") + @Description("%desc_item_requirement_removeall") public void onItemRequirementRemoveAll(@Flags("itemheld") Player player) { Locale locale = plugin.getUser(player).getLocale(); @@ -287,6 +287,7 @@ public void onItemRequirementRemoveAll(@Flags("itemheld") Player player) { @Subcommand("register") @CommandPermission("auraskills.command.item.register") + @Description("%desc_item_register") public void onItemRegister(@Flags("itemheld") Player player, String key) { Locale locale = plugin.getUser(player).getLocale(); if (key.contains(" ")) { // Disallow spaces in key name @@ -305,6 +306,7 @@ public void onItemRegister(@Flags("itemheld") Player player, String key) { @Subcommand("unregister") @CommandPermission("auraskills.command.item.register") @CommandCompletion("@item_keys") + @Description("%desc_item_unregister") public void onItemUnregister(Player player, String key) { Locale locale = plugin.getUser(player).getLocale(); if (plugin.getItemRegistry().getItem(NamespacedId.fromDefault(key)) != null) { // Check that there is an item registered on the key @@ -318,6 +320,7 @@ public void onItemUnregister(Player player, String key) { @Subcommand("give") @CommandPermission("auraskills.command.item.give") @CommandCompletion("@players @item_keys") + @Description("%desc_item_give") public void onItemGive(CommandSender sender, @Flags("other") Player player, String key, @Default("-1") int amount) { ItemStack item = plugin.getItemRegistry().getItem(NamespacedId.fromDefault(key)); Locale locale = plugin.getLocale(sender); @@ -358,7 +361,7 @@ public void onItemGive(CommandSender sender, @Flags("other") Player player, Stri @Subcommand("multiplier add") @CommandCompletion("@skills_global @nothing true|false") @CommandPermission("auraskills.command.item.multiplier") - @Description("Adds an item multiplier to the held item to global or a specific skill where value is the percent more XP gained.") + @Description("%desc_item_multiplier_add") public void onItemMultiplierAdd(@Flags("itemheld") Player player, String target, double value, @Default("true") boolean lore) { ItemStack item = player.getInventory().getItemInMainHand(); Skill skill = plugin.getSkillRegistry().getOrNull(NamespacedId.fromDefault(target)); @@ -406,7 +409,7 @@ public void onItemMultiplierAdd(@Flags("itemheld") Player player, String target, @Subcommand("multiplier remove") @CommandCompletion("@skills_global") @CommandPermission("auraskills.command.item.multiplier") - @Description("Removes an item multiplier of a the specified skill or global from the held item.") + @Description("%desc_item_multiplier_remove") public void onItemMultiplierRemove(@Flags("itemheld") Player player, String target) { Locale locale = plugin.getUser(player).getLocale(); ItemStack item = player.getInventory().getItemInMainHand(); @@ -443,7 +446,7 @@ public void onItemMultiplierRemove(@Flags("itemheld") Player player, String targ @Subcommand("multiplier list") @CommandPermission("auraskills.command.item.multiplier") - @Description("Lists all item multipliers on the held item.") + @Description("%desc_item_multiplier_list") public void onItemMultiplierList(@Flags("itemheld") Player player) { Locale locale = plugin.getUser(player).getLocale(); ItemStack item = player.getInventory().getItemInMainHand(); @@ -464,7 +467,7 @@ public void onItemMultiplierList(@Flags("itemheld") Player player) { @Subcommand("multiplier removeall") @CommandPermission("auraskills.command.item.multiplier") - @Description("Removes all item multipliers from the item held.") + @Description("%desc_item_multiplier_removeall") public void onItemMultiplierRemoveAll(@Flags("itemheld") Player player) { Locale locale = plugin.getUser(player).getLocale(); @@ -479,7 +482,7 @@ public void onItemMultiplierRemoveAll(@Flags("itemheld") Player player) { @Subcommand("ignore add") @CommandPermission("auraskills.command.item.ignore") - @Description("Adds the tag that ignores the held item from mana ability interactions.") + @Description("%desc_item_ignore_add") public void onItemIgnoreAdd(@Flags("itemheld") Player player) { Locale locale = plugin.getUser(player).getLocale(); @@ -489,12 +492,12 @@ public void onItemIgnoreAdd(@Flags("itemheld") Player player) { item = skillsItem.getItem(); player.getInventory().setItemInMainHand(item); - player.sendMessage(plugin.getPrefix(locale) + plugin.getMsg(CommandMessage.ITEM_IGNORE_ADD, locale)); + player.sendMessage(plugin.getPrefix(locale) + plugin.getMsg(CommandMessage.ITEM_IGNORE_ADD_ADDED, locale)); } @Subcommand("ignore remove") @CommandPermission("auraskills.command.item.ignore") - @Description("Removes the tag that ignores the held item from mana ability interactions.") + @Description("%desc_item_ignore_remove") public void onItemIgnoreRemove(@Flags("itemheld") Player player) { Locale locale = plugin.getUser(player).getLocale(); @@ -504,7 +507,7 @@ public void onItemIgnoreRemove(@Flags("itemheld") Player player) { item = skillsItem.getItem(); player.getInventory().setItemInMainHand(item); - player.sendMessage(plugin.getPrefix(locale) + plugin.getMsg(CommandMessage.ITEM_IGNORE_REMOVE, locale)); + player.sendMessage(plugin.getPrefix(locale) + plugin.getMsg(CommandMessage.ITEM_IGNORE_REMOVE_REMOVED, locale)); } } diff --git a/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/commands/JobsCommand.java b/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/commands/JobsCommand.java index c10196604..6a8ad1a5b 100644 --- a/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/commands/JobsCommand.java +++ b/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/commands/JobsCommand.java @@ -27,6 +27,7 @@ public JobsCommand(AuraSkills plugin) { @Subcommand("add") @CommandCompletion("@skills @players") @CommandPermission("auraskills.command.jobs") + @Description("%desc_jobs_add") public void onAddOther(CommandIssuer issuer, Skill job, @Flags("other") @CommandPermission("auraskills.command.jobs.other") @Optional User user) { Locale locale = plugin.getLocale(issuer); if (user == null) { @@ -65,6 +66,7 @@ private void addJobToPlayer(User user, Skill job, Locale locale, CommandIssuer i @Subcommand("remove") @CommandCompletion("@skills @players") @CommandPermission("auraskills.command.jobs") + @Description("%desc_jobs_remove") public void onRemove(CommandIssuer issuer, Skill job, @Flags("other") @CommandPermission("auraskills.command.jobs.other") @Optional User user) { Locale locale = plugin.getLocale(issuer); if (user == null) { @@ -97,6 +99,7 @@ private void removeJobFromPlayer(User user, Skill job, Locale locale, CommandIss @Subcommand("removeall") @CommandCompletion("@players") @CommandPermission("auraskills.command.jobs") + @Description("%desc_jobs_removeall") public void onRemoveAll(CommandIssuer issuer, @Flags("other") @CommandPermission("auraskills.command.jobs.other") @Optional User user) { Locale locale = plugin.getLocale(issuer); if (user == null) { diff --git a/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/commands/ManaAbilityCommand.java b/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/commands/ManaAbilityCommand.java index 216079790..5d724a192 100644 --- a/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/commands/ManaAbilityCommand.java +++ b/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/commands/ManaAbilityCommand.java @@ -28,7 +28,7 @@ public ManaAbilityCommand(AuraSkills plugin) { @Subcommand("resetcooldown") @CommandCompletion("@players @mana_abilities false|true") @CommandPermission("auraskills.command.manaability.resetcooldown") - @Description("Resets a specific mana ability cooldown for a player with optionally filling up the player mana") + @Description("%desc_manaability_resetcooldown") public void onResetCooldown(CommandSender sender, @Flags("other") Player player, ManaAbility ability, @Default("false") boolean fillMana) { User user = plugin.getUser(player); Locale locale = user.getLocale(); @@ -48,7 +48,7 @@ public void onResetCooldown(CommandSender sender, @Flags("other") Player player, sender.sendMessage(MessageBuilder.create(plugin).locale(locale) .prefix() - .message(CommandMessage.MANA_ABILITY_COOLDOWN_RESET, "player", player.getName(), "ability", ability.getDisplayName(locale)) + .message(CommandMessage.MANAABILITY_RESETCOOLDOWN_COOLDOWN_RESET, "player", player.getName(), "ability", ability.getDisplayName(locale)) .toString()); } else { sender.sendMessage(plugin.getPrefix(locale) + plugin.getMsg(CommandMessage.UNKNOWN_MANA_ABILITY, locale)); diff --git a/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/commands/ModifierCommand.java b/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/commands/ModifierCommand.java index d914a6950..1bf38d956 100644 --- a/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/commands/ModifierCommand.java +++ b/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/commands/ModifierCommand.java @@ -32,7 +32,7 @@ public ModifierCommand(AuraSkills plugin) { @Subcommand("add") @CommandPermission("auraskills.command.modifier") @CommandCompletion("@players @stats @nothing @nothing true true") - @Description("Adds a stat modifier to a player.") + @Description("%desc_modifier_add") public void onAdd(CommandSender sender, @Flags("other") Player player, Stat stat, String name, double value, @Default("false") boolean silent, @Default("false") boolean stack) { User user = plugin.getUser(player); Locale locale = user.getLocale(); @@ -77,7 +77,7 @@ public static String getStackedName(Set modifierNames, String name) { @Subcommand("remove") @CommandPermission("auraskills.command.modifier") @CommandCompletion("@players @modifiers true") - @Description("Removes a specific stat modifier from a player.") + @Description("%desc_modifier_remove") public void onRemove(CommandSender sender, @Flags("other") Player player, String name, @Default("false") boolean silent) { User user = plugin.getUser(player); Locale locale = user.getLocale(); @@ -95,7 +95,7 @@ public void onRemove(CommandSender sender, @Flags("other") Player player, String @Subcommand("list") @CommandCompletion("@players @stats") @CommandPermission("auraskills.command.modifier") - @Description("Lists all or a specific stat's modifiers for a player.") + @Description("%desc_modifier_list") public void onList(CommandSender sender, @Flags("other") @Optional Player player, @Optional Stat stat) { Locale locale = plugin.getLocale(sender); if (player == null) { @@ -133,7 +133,7 @@ private void listModifiers(CommandSender sender, @Optional @Flags("other") Playe @Subcommand("removeall") @CommandCompletion("@players @stats") @CommandPermission("auraskills.command.modifier") - @Description("Removes all stat modifiers from a player.") + @Description("%desc_modifier_removeall") public void onRemoveAll(CommandSender sender, @Flags("other") @Optional Player player, @Optional Stat stat, @Default("false") boolean silent) { Locale locale = plugin.getLocale(sender); if (player == null) { diff --git a/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/commands/OpenMenuCommand.java b/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/commands/OpenMenuCommand.java index dc6ffc6fe..c85ce0a74 100644 --- a/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/commands/OpenMenuCommand.java +++ b/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/commands/OpenMenuCommand.java @@ -42,6 +42,7 @@ public OpenMenuCommand(AuraSkills plugin) { @Default @CommandPermission("auraskills.command.openmenu") @CommandCompletion("@menu_names @players") + @Description("%desc_openmenu") public void onOpenMenu(CommandSender sender, String menuName, @Optional @Flags("other") Player target, @Optional JsonArg properties, @Default("0") int page) { Locale locale = plugin.getLocale(sender); if (target == null) { // Open menu for sender diff --git a/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/commands/PresetCommand.java b/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/commands/PresetCommand.java index 115207547..4e7771a9d 100644 --- a/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/commands/PresetCommand.java +++ b/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/commands/PresetCommand.java @@ -4,6 +4,7 @@ import co.aikar.commands.CommandIssuer; import co.aikar.commands.annotation.CommandAlias; import co.aikar.commands.annotation.CommandPermission; +import co.aikar.commands.annotation.Description; import co.aikar.commands.annotation.Subcommand; import dev.aurelium.auraskills.bukkit.AuraSkills; import dev.aurelium.auraskills.common.config.preset.ConfigPreset; @@ -28,6 +29,7 @@ public PresetCommand(AuraSkills plugin) { @Subcommand("load") @CommandPermission("auraskills.command.preset") + @Description("%desc_preset_load") public void onLoad(CommandIssuer issuer, String file) { Locale locale = plugin.getLocale(issuer); diff --git a/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/commands/ProfileCommand.java b/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/commands/ProfileCommand.java index d6a24143e..b27df66e5 100644 --- a/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/commands/ProfileCommand.java +++ b/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/commands/ProfileCommand.java @@ -4,10 +4,7 @@ import co.aikar.commands.MessageType; import co.aikar.commands.MinecraftMessageKeys; import co.aikar.commands.PaperCommandManager; -import co.aikar.commands.annotation.CommandAlias; -import co.aikar.commands.annotation.CommandCompletion; -import co.aikar.commands.annotation.CommandPermission; -import co.aikar.commands.annotation.Subcommand; +import co.aikar.commands.annotation.*; import dev.aurelium.auraskills.api.skill.Skill; import dev.aurelium.auraskills.api.stat.Stat; import dev.aurelium.auraskills.api.stat.StatModifier; @@ -37,6 +34,7 @@ public ProfileCommand(AuraSkills plugin) { @Subcommand("skills") @CommandPermission("auraskills.command.profile") @CommandCompletion("@players") + @Description("%desc_profile_skills") @SuppressWarnings("deprecation") public void onSkills(CommandSender sender, String player) { OfflinePlayer offlinePlayer = Bukkit.getOfflinePlayer(player); @@ -69,6 +67,7 @@ public void run() { @Subcommand("stats") @CommandPermission("auraskills.command.profile") @CommandCompletion("@players") + @Description("%desc_profile_stats") @SuppressWarnings("deprecation") public void onStats(CommandSender sender, String player) { OfflinePlayer offlinePlayer = Bukkit.getOfflinePlayer(player); @@ -100,7 +99,7 @@ public void run() { private void sendSkillsMessage(CommandSender sender, String username, UUID uuid, Map skillLevels, Map skillXp) { Locale locale = plugin.getLocale(sender); - String message = plugin.getMsg(CommandMessage.PROFILE_SKILLS, locale); + String message = plugin.getMsg(CommandMessage.PROFILE_SKILLS_HEADER, locale); message = TextUtil.replace(message, "{name}", username, "{uuid}", uuid.toString()); StringBuilder skillEntries = new StringBuilder(); // Sort skills alphabetically @@ -110,7 +109,7 @@ private void sendSkillsMessage(CommandSender sender, String username, UUID uuid, for (Skill skill : skillList) { if (!plugin.getSkillManager().isLoaded(skill)) continue; - skillEntries.append(TextUtil.replace(plugin.getMsg(CommandMessage.PROFILE_SKILL_ENTRY, locale), + skillEntries.append(TextUtil.replace(plugin.getMsg(CommandMessage.PROFILE_SKILLS_ENTRY, locale), "{skill}", TextUtil.capitalize(skill.name().toLowerCase(Locale.ROOT)), "{level}", String.valueOf(skillLevels.get(skill)), "{xp}", NumberUtil.format1(skillXp.get(skill)))); @@ -121,7 +120,7 @@ private void sendSkillsMessage(CommandSender sender, String username, UUID uuid, private void sendStatsMessage(CommandSender sender, String username, UUID uuid, Map skillLevels, Map statModifiers) { Locale locale = plugin.getLocale(sender); - String message = plugin.getMsg(CommandMessage.PROFILE_STATS, locale); + String message = plugin.getMsg(CommandMessage.PROFILE_STATS_HEADER, locale); message = TextUtil.replace(message, "{name}", username, "{uuid}", uuid.toString()); Map baseStats = new HashMap<>(); @@ -154,7 +153,7 @@ private void sendStatsMessage(CommandSender sender, String username, UUID uuid, for (Stat stat : statList) { if (!plugin.getStatManager().isLoaded(stat)) continue; - statEntries.append(TextUtil.replace(plugin.getMsg(CommandMessage.PROFILE_STAT_ENTRY, locale), + statEntries.append(TextUtil.replace(plugin.getMsg(CommandMessage.PROFILE_STATS_ENTRY, locale), "{stat}", TextUtil.capitalize(stat.name().toLowerCase(Locale.ROOT)), "{total_level}", NumberUtil.format1(totalStats.getOrDefault(stat, 0.0)), "{base_level}", NumberUtil.format1(baseStats.getOrDefault(stat, 0.0)), diff --git a/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/commands/ReloadExecutor.java b/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/commands/ReloadExecutor.java index dcec428e4..61c0a36a4 100644 --- a/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/commands/ReloadExecutor.java +++ b/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/commands/ReloadExecutor.java @@ -50,7 +50,7 @@ public void reload(CommandSender sender) { plugin.getHookManager().getHook(HologramsHook.class).loadConfig(); } reloadPlayers(); - sender.sendMessage(plugin.getPrefix(locale) + plugin.getMsg(CommandMessage.RELOAD, locale)); + sender.sendMessage(plugin.getPrefix(locale) + plugin.getMsg(CommandMessage.RELOAD_RELOADED, locale)); } private void reloadPlayers() { diff --git a/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/commands/SkillCommand.java b/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/commands/SkillCommand.java index 1de8d1e28..8af4b183e 100644 --- a/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/commands/SkillCommand.java +++ b/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/commands/SkillCommand.java @@ -25,7 +25,7 @@ public SkillCommand(AuraSkills plugin) { @Subcommand("setlevel") @CommandCompletion("@players @skills") @CommandPermission("auraskills.command.skill.setlevel") - @Description("Sets a specific skill to a level for a player.") + @Description("%desc_skill_setlevel") public void onSkillSetlevel(CommandSender sender, @Flags("other") Player player, Skill skill, int level) { User user = plugin.getUser(player); Locale locale = user.getLocale(); @@ -59,7 +59,7 @@ public void onSkillSetlevel(CommandSender sender, @Flags("other") Player player, @Subcommand("setall") @CommandCompletion("@players") @CommandPermission("auraskills.command.skill.setlevel") - @Description("Sets all of a player's skills to a level.") + @Description("%desc_skill_setall") public void onSkillSetall(CommandSender sender, @Flags("other") Player player, int level) { User user = plugin.getUser(player); Locale locale = user.getLocale(); @@ -93,7 +93,7 @@ public void onSkillSetall(CommandSender sender, @Flags("other") Player player, i @Subcommand("reset") @CommandCompletion("@players @skills") @CommandPermission("auraskills.command.skill.reset") - @Description("Resets all skills or a specific skill to the starting level for a player.") + @Description("%desc_skill_reset") public void onSkillReset(CommandSender sender, @Flags("other") Player player, @Optional Skill skill) { User user = plugin.getUser(player); Locale locale = user.getLocale(); diff --git a/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/commands/SkillsRootCommand.java b/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/commands/SkillsRootCommand.java index da8ab242b..b287ca402 100644 --- a/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/commands/SkillsRootCommand.java +++ b/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/commands/SkillsRootCommand.java @@ -42,7 +42,7 @@ public SkillsRootCommand(AuraSkills plugin) { @Default @CommandPermission("auraskills.command.skills") - @Description("Opens the Skills menu, where you can browse skills, progress, and abilities.") + @Description("%desc_skills") public void onSkills(Player player) { if (plugin.getUserManager().hasUser(player.getUniqueId())) { plugin.getSlate().openMenu(player, "skills"); @@ -53,7 +53,7 @@ public void onSkills(Player player) { @Subcommand("reload") @CommandPermission("auraskills.command.reload") - @Description("Reloads the config, messages, menus, loot tables, action bars, boss bars, and health and luck stats.") + @Description("%desc_reload") public void reload(CommandSender sender) { new ReloadExecutor(plugin).reload(sender); } @@ -68,7 +68,7 @@ public void onHelp(CommandSender sender, CommandHelp help) { @CommandAlias("skilltop") @CommandCompletion("@skill_top") @CommandPermission("auraskills.command.top") - @Description("Shows the top players in a skill") + @Description("%desc_top") @Syntax("Usage: /sk top or /sk top [skill] ") public void onTop(CommandSender sender, String[] args) { Locale locale = plugin.getLocale(sender); @@ -168,7 +168,7 @@ private void sendLeaderboardEntries(CommandSender sender, Locale locale, List { Locale locale = plugin.getLocale(sender); @@ -185,7 +185,7 @@ public void onSave(CommandSender sender) { @Subcommand("updateleaderboards") @CommandPermission("auraskills.command.updateleaderboards") - @Description("Updates and sorts the leaderboards") + @Description("%desc_updateleaderboards") public void onUpdateLeaderboards(CommandSender sender) { Locale locale = plugin.getLocale(sender); if (plugin.getLeaderboardManager().isNotSorting()) { @@ -202,7 +202,7 @@ public void onUpdateLeaderboards(CommandSender sender) { @Subcommand("toggle") @CommandAlias("abtoggle") @CommandPermission("auraskills.command.abtoggle") - @Description("Toggle your own action bar") + @Description("%desc_toggle") public void onActionBarToggle(Player player) { User user = plugin.getUser(player); Locale locale = user.getLocale(); @@ -222,7 +222,7 @@ public void onActionBarToggle(Player player) { @Subcommand("rank") @CommandAlias("skillrank") @CommandPermission("auraskills.command.rank") - @Description("Shows your skill rankings") + @Description("%desc_rank") public void onRank(Player player) { Locale locale = plugin.getLocale(player); player.sendMessage(plugin.getMsg(CommandMessage.RANK_HEADER, locale)); @@ -240,7 +240,7 @@ public void onRank(Player player) { @Subcommand("lang") @CommandCompletion("@lang") @CommandPermission("auraskills.command.lang") - @Description("Changes your player language") + @Description("%desc_lang") public void onLanguage(Player player, String language) { Locale locale = new Locale(language.toLowerCase(Locale.ROOT)); if (plugin.getMessageProvider().hasLocale(locale)) { @@ -258,7 +258,7 @@ public void onLanguage(Player player, String language) { @Subcommand("multiplier") @CommandCompletion("@players") @CommandPermission("auraskills.command.multiplier") - @Description("Shows a player's current XP multiplier based on their permissions.") + @Description("%desc_multiplier") public void onMultiplier(CommandSender sender, @Optional @Flags("other") Player player) { Player target; if (player == null) { @@ -292,7 +292,7 @@ public void onMultiplier(CommandSender sender, @Optional @Flags("other") Player @Subcommand("resethealth") @CommandPermission("auraskills.command.resethealth") - @Description("Removes all attribute modifiers by Aurelium Skills for easy uninstalling. This only works on offline players.") + @Description("%desc_resethealth") public void onResetHealth(CommandSender sender) { if (sender instanceof ConsoleCommandSender || sender instanceof RemoteConsoleCommandSender) { Uninstaller uninstaller = new Uninstaller(); diff --git a/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/commands/StatsCommand.java b/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/commands/StatsCommand.java index 11f363705..883952fa1 100644 --- a/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/commands/StatsCommand.java +++ b/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/commands/StatsCommand.java @@ -19,7 +19,7 @@ public StatsCommand(AuraSkills plugin) { @Default @CommandPermission("auraskills.command.stats") - @Description("Opens the Stats menu where you can see current stat levels and descriptions.") + @Description("%desc_stats") public void onStats(Player player) { plugin.getSlate().openMenu(player, "stats"); } diff --git a/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/commands/TraitCommand.java b/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/commands/TraitCommand.java index ab81b6cf3..4d959bad3 100644 --- a/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/commands/TraitCommand.java +++ b/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/commands/TraitCommand.java @@ -30,7 +30,7 @@ public TraitCommand(AuraSkills plugin) { @Subcommand("add") @CommandPermission("auraskills.command.modifier") @CommandCompletion("@players @traits @nothing @nothing true true") - @Description("Adds a trait modifier to a player.") + @Description("%desc_trait_add") public void onAdd(CommandSender sender, @Flags("other") Player player, Trait trait, String name, double value, @Default("false") boolean silent, @Default("false") boolean stack) { User user = plugin.getUser(player); Locale locale = user.getLocale(); @@ -57,7 +57,7 @@ public void onAdd(CommandSender sender, @Flags("other") Player player, Trait tra @Subcommand("remove") @CommandPermission("auraskills.command.modifier") @CommandCompletion("@players @modifiers true") - @Description("Removes a specific trait modifier from a player.") + @Description("%desc_trait_remove") public void onRemove(CommandSender sender, @Flags("other") Player player, String name, @Default("false") boolean silent) { User user = plugin.getUser(player); Locale locale = user.getLocale(); @@ -75,7 +75,7 @@ public void onRemove(CommandSender sender, @Flags("other") Player player, String @Subcommand("list") @CommandCompletion("@players @traits") @CommandPermission("auraskills.command.modifier") - @Description("Lists all or a specific trait's modifiers for a player.") + @Description("%desc_trait_list") public void onList(CommandSender sender, @Flags("other") @Optional Player player, @Optional Trait trait) { Locale locale = plugin.getLocale(sender); if (player == null) { @@ -113,7 +113,7 @@ private void listModifiers(CommandSender sender, @Optional @Flags("other") Playe @Subcommand("removeall") @CommandCompletion("@players @traits") @CommandPermission("auraskills.command.modifier") - @Description("Removes all trait modifiers from a player.") + @Description("%desc_trait_removeall") public void onRemoveAll(CommandSender sender, @Flags("other") @Optional Player player, @Optional Trait trait, @Default("false") boolean silent) { Locale locale = plugin.getLocale(sender); if (player == null) { diff --git a/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/commands/XpCommand.java b/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/commands/XpCommand.java index aebc74e4e..d9ba6fe15 100644 --- a/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/commands/XpCommand.java +++ b/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/commands/XpCommand.java @@ -26,14 +26,14 @@ public XpCommand(AuraSkills plugin) { @Subcommand("add") @CommandCompletion("@players @skills") @CommandPermission("auraskills.command.xp.add") - @Description("Adds skill XP to a player for a certain skill.") + @Description("%desc_xp_add") public void onXpAdd(CommandSender sender, @Flags("other") Player player, Skill skill, double amount, @Default("false") boolean silent) { User user = plugin.getUser(player); Locale locale = user.getLocale(); if (skill.isEnabled()) { plugin.getLevelManager().addXp(user, skill, null, amount); if (!silent) { - sender.sendMessage(plugin.getPrefix(locale) + TextUtil.replace(plugin.getMsg(CommandMessage.XP_ADD, locale), + sender.sendMessage(plugin.getPrefix(locale) + TextUtil.replace(plugin.getMsg(CommandMessage.XP_ADD_ADDED, locale), "{amount}", String.valueOf(amount), "{skill}", skill.getDisplayName(locale), "{player}", player.getName())); @@ -46,14 +46,14 @@ public void onXpAdd(CommandSender sender, @Flags("other") Player player, Skill s @Subcommand("set") @CommandCompletion("@players @skills") @CommandPermission("auraskills.command.xp.set") - @Description("Sets a player's skill XP for a certain skill to an amount.") + @Description("%desc_xp_set") public void onXpSet(CommandSender sender, @Flags("other") Player player, Skill skill, double amount, @Default("false") boolean silent) { User user = plugin.getUser(player); Locale locale = user.getLocale(); if (skill.isEnabled()) { plugin.getLevelManager().setXp(user, skill, amount); if (!silent) { - sender.sendMessage(plugin.getPrefix(locale) + TextUtil.replace(plugin.getMsg(CommandMessage.XP_SET, locale), + sender.sendMessage(plugin.getPrefix(locale) + TextUtil.replace(plugin.getMsg(CommandMessage.XP_SET_SET, locale), "{amount}", String.valueOf(amount), "{skill}", skill.getDisplayName(locale), "{player}", player.getName())); @@ -66,7 +66,7 @@ public void onXpSet(CommandSender sender, @Flags("other") Player player, Skill s @Subcommand("remove") @CommandCompletion("@players @skills") @CommandPermission("auraskills.command.xp.remove") - @Description("Removes skill XP from a player in a certain skill.") + @Description("%desc_xp_remove") public void onXpRemove(CommandSender sender, @Flags("other") Player player, Skill skill, double amount, @Default("false") boolean silent) { User user = plugin.getUser(player); Locale locale = user.getLocale(); @@ -74,14 +74,14 @@ public void onXpRemove(CommandSender sender, @Flags("other") Player player, Skil if (user.getSkillXp(skill) - amount >= 0) { plugin.getLevelManager().setXp(user, skill, user.getSkillXp(skill) - amount); if (!silent) { - sender.sendMessage(plugin.getPrefix(locale) + TextUtil.replace(plugin.getMsg(CommandMessage.XP_REMOVE, locale), + sender.sendMessage(plugin.getPrefix(locale) + TextUtil.replace(plugin.getMsg(CommandMessage.XP_REMOVE_REMOVED, locale), "{amount}", String.valueOf(amount), "{skill}", skill.getDisplayName(locale), "{player}", player.getName())); } } else { if (!silent) { - sender.sendMessage(plugin.getPrefix(locale) + TextUtil.replace(plugin.getMsg(CommandMessage.XP_REMOVE, locale), + sender.sendMessage(plugin.getPrefix(locale) + TextUtil.replace(plugin.getMsg(CommandMessage.XP_REMOVE_REMOVED, locale), "{amount}", String.valueOf(user.getSkillXp(skill)), "{skill}", skill.getDisplayName(locale), "{player}", player.getName())); diff --git a/common/src/main/java/dev/aurelium/auraskills/common/commands/Command.java b/common/src/main/java/dev/aurelium/auraskills/common/commands/Command.java index a91b9892c..f9b559b62 100644 --- a/common/src/main/java/dev/aurelium/auraskills/common/commands/Command.java +++ b/common/src/main/java/dev/aurelium/auraskills/common/commands/Command.java @@ -1,7 +1,8 @@ package dev.aurelium.auraskills.common.commands; public enum Command { - + + ANTIAFK_LOGS, ARMOR_MODIFIER_ADD, ARMOR_MODIFIER_REMOVE, ARMOR_MODIFIER_LIST, @@ -44,25 +45,34 @@ public enum Command { JOBS_REMOVEALL, LANG, MANA, + MANA_ADD, + MANA_REMOVE, + MANA_SET, + MANAABILITY_RESETCOOLDOWN, MODIFIER_ADD, MODIFIER_REMOVE, MODIFIER_LIST, MODIFIER_REMOVEALL, - TRAIT_ADD, - TRAIT_REMOVE, - TRAIT_LIST, - TRAIT_REMOVEALL, MULTIPLIER, - PRESET, - PROFILE, + OPENMENU, + PRESET_LOAD, + PROFILE_SKILLS, + PROFILE_STATS, RANK, RELOAD, + RESETHEALTH, SAVE, SKILL_RESET, SKILL_SETALL, SKILL_SETLEVEL, + SKILLS, + STATS, TOGGLE, TOP, + TRAIT_ADD, + TRAIT_REMOVE, + TRAIT_LIST, + TRAIT_REMOVEALL, TRANSFER, CLAIMITEMS, UPDATELEADERBOARDS, diff --git a/common/src/main/java/dev/aurelium/auraskills/common/commands/ManaCommand.java b/common/src/main/java/dev/aurelium/auraskills/common/commands/ManaCommand.java index bd0c58424..33cb88470 100644 --- a/common/src/main/java/dev/aurelium/auraskills/common/commands/ManaCommand.java +++ b/common/src/main/java/dev/aurelium/auraskills/common/commands/ManaCommand.java @@ -23,7 +23,7 @@ public ManaCommand(AuraSkillsPlugin plugin) { @Default @CommandPermission("auraskills.command.mana") - @Description("Display your or another player's current and max mana") + @Description("%desc_mana") public void onMana(CommandIssuer issuer, @Flags("other") @CommandPermission("auraskills.command.mana.other") @Optional User user) { if (issuer.isPlayer()) { // Get issuer's own mana // Get the PlayerData of the issuer @@ -60,7 +60,7 @@ public void onMana(CommandIssuer issuer, @Flags("other") @CommandPermission("aur @Subcommand("add") @CommandPermission("auraskills.command.mana.add") @CommandCompletion("@players @nothing false|true") - @Description("Adds mana to a player") + @Description("%desc_mana_add") public void onManaAdd(CommandIssuer issuer, @Flags("other") User user, double amount, @Default("true") boolean allowOverMax, @Default("false") boolean silent) { Locale locale = user.getLocale(); if (amount < 0) { // Validate amount @@ -83,7 +83,7 @@ public void onManaAdd(CommandIssuer issuer, @Flags("other") User user, double am if (!silent) { // Send message MessageBuilder.create(plugin).locale(locale) .prefix() - .message(CommandMessage.MANA_ADD, + .message(CommandMessage.MANA_ADD_ADDED, "amount", NumberUtil.format2(manaToAdd), "player", user.getUsername()) .send(issuer); @@ -93,7 +93,7 @@ public void onManaAdd(CommandIssuer issuer, @Flags("other") User user, double am @Subcommand("remove") @CommandPermission("auraskills.command.mana.remove") @CommandCompletion("@players") - @Description("Removes mana from a player") + @Description("%desc_mana_remove") public void onManaRemove(CommandIssuer issuer, @Flags("other") User user, double amount, @Default("false") boolean silent) { Locale locale = user.getLocale(); if (amount < 0) { // Validate amount @@ -114,7 +114,7 @@ public void onManaRemove(CommandIssuer issuer, @Flags("other") User user, double if (!silent) { // Send message MessageBuilder.create(plugin).locale(locale) .prefix() - .message(CommandMessage.MANA_REMOVE, + .message(CommandMessage.MANA_REMOVE_REMOVED, "amount", NumberUtil.format2(manaToRemove), "player", user.getUsername()) .send(issuer); @@ -124,7 +124,7 @@ public void onManaRemove(CommandIssuer issuer, @Flags("other") User user, double @Subcommand("set") @CommandPermission("auraskills.command.mana.set") @CommandCompletion("@players @nothing false|true") - @Description("Sets the mana of player") + @Description("%desc_mana_set") public void onManaSet(CommandIssuer issuer, @Flags("other") User user, double amount, @Default("true") boolean allowOverMax, @Default("false") boolean silent) { if (user == null) return; Locale locale = user.getLocale(); @@ -147,7 +147,7 @@ public void onManaSet(CommandIssuer issuer, @Flags("other") User user, double am if (!silent) { MessageBuilder.create(plugin).locale(locale) .prefix() - .message(CommandMessage.MANA_SET, + .message(CommandMessage.MANA_SET_SET, "amount", NumberUtil.format2(manaToSet), "player", user.getUsername()) .send(issuer); diff --git a/common/src/main/java/dev/aurelium/auraskills/common/message/MessageProvider.java b/common/src/main/java/dev/aurelium/auraskills/common/message/MessageProvider.java index 5dae6968a..22557a6ea 100644 --- a/common/src/main/java/dev/aurelium/auraskills/common/message/MessageProvider.java +++ b/common/src/main/java/dev/aurelium/auraskills/common/message/MessageProvider.java @@ -56,6 +56,8 @@ public MessageProvider(AuraSkillsPlugin plugin) { .build(); this.polyglot = new Polyglot(this, config); this.manager = this.polyglot.getMessageManager(); + // Register message updates + Arrays.stream(MessageUpdates.values()).forEach(this.manager::registerMessageUpdate); this.defaultLanguage = null; } diff --git a/common/src/main/java/dev/aurelium/auraskills/common/message/MessageUpdates.java b/common/src/main/java/dev/aurelium/auraskills/common/message/MessageUpdates.java new file mode 100644 index 000000000..492448d5e --- /dev/null +++ b/common/src/main/java/dev/aurelium/auraskills/common/message/MessageUpdates.java @@ -0,0 +1,54 @@ +package dev.aurelium.auraskills.common.message; + +import com.archyx.polyglot.lang.MessageUpdate; + +public enum MessageUpdates implements MessageUpdate { + + COMMANDS_MANA_ADD(36, "commands.mana.add", "Key commands.mana.add has been converted to a mapping. " + + "The message has been reset and moved to commands.mana.add.added"), + COMMANDS_MANA_REMOVE(36, "commands.mana.remove", "Key commands.mana.remove has been converted to a mapping. " + + "The message has been reset and moved to commands.mana.remove.removed"), + COMMANDS_MANA_SET(36, "commands.mana.set", "Key commands.mana.set has been converted to a mapping. " + + "The message has been reset and moved to commands.mana.set.set"), + COMMANDS_ITEM_IGNORE_ADD(36, "commands.item.ignore.add", "Key commands.item.ignore.add has been converted to a mapping. " + + "The message has been reset and moved to commands.item.ignore.add.added"), + COMMANDS_ITEM_IGNORE_REMOVE(36, "commands.item.ignore.add", "Key commands.item.ignore.remove has been converted to a mapping. " + + "The message has been reset and moved to commands.item.ignore.remove.removed"), + COMMANDS_RELOAD(36, "commands.reload", "Key commands.reload has been converted to a mapping. " + + "The message has been reset and moved to commands.reload.reloaded"), + COMMANDS_XP_ADD(36, "commands.xp.add", "Key commands.xp.add has been converted to a mapping. " + + "The message has been reset and moved to commands.xp.add.added"), + COMMANDS_XP_REMOVE(36, "commands.xp.remove", "Key commands.xp.remove has been converted to a mapping. " + + "The message has been reset and moved to commands.xp.remove.removed"), + COMMANDS_XP_SET(36, "commands.xp.set", "Key commands.xp.set has been converted to a mapping. " + + "The message has been reset and moved to commands.xp.set.set"), + COMMANDS_PROFILE_SKILLS(36, "commands.profile.skills", "Key commands.profile.skills has been converted to a mapping. " + + "The message has been reset and moved to commands.profile.skills.header"), + COMMANDS_PROFILE_STATS(36, "commands.profile.stats", "Key commands.profile.stats has been converted to a mapping. " + + "The message has been reset and moved to commands.profile.stats.header"); + + private final int version; + private final String path; + private final String message; + + MessageUpdates(int version, String path, String message) { + this.version = version; + this.path = path; + this.message = message; + } + + @Override + public int getVersion() { + return version; + } + + @Override + public String getPath() { + return path; + } + + @Override + public String getMessage() { + return message; + } +} diff --git a/common/src/main/java/dev/aurelium/auraskills/common/message/type/CommandMessage.java b/common/src/main/java/dev/aurelium/auraskills/common/message/type/CommandMessage.java index ce604c2d6..a966c5183 100644 --- a/common/src/main/java/dev/aurelium/auraskills/common/message/type/CommandMessage.java +++ b/common/src/main/java/dev/aurelium/auraskills/common/message/type/CommandMessage.java @@ -91,8 +91,8 @@ public enum CommandMessage implements MessageKey { ITEM_REQUIREMENT_ENTRY, ITEM_UNREGISTER_UNREGISTERED, ITEM_UNREGISTER_NOT_REGISTERED(Command.ITEM_UNREGISTER, "not_registered"), - ITEM_IGNORE_ADD, - ITEM_IGNORE_REMOVE, + ITEM_IGNORE_ADD_ADDED, + ITEM_IGNORE_REMOVE_REMOVED, JOBS_ADD_ADDED, JOBS_ADD_LIMITED, JOBS_ADD_EXISTING, @@ -103,9 +103,9 @@ public enum CommandMessage implements MessageKey { LANG_NOT_FOUND(Command.LANG, "not_found"), MANA_DISPLAY, MANA_DISPLAY_OTHER(Command.MANA, "display_other"), - MANA_SET, - MANA_ADD, - MANA_REMOVE, + MANA_ADD_ADDED, + MANA_REMOVE_REMOVED, + MANA_SET_SET, MANA_AT_LEAST_ZERO(Command.MANA, "at_least_zero"), MANA_CONSOLE_SPECIFY_PLAYER(Command.MANA, "console_specify_player"), MODIFIER_ADD_ADDED, @@ -136,14 +136,14 @@ public enum CommandMessage implements MessageKey { PRESET_LOAD_REPLACED, PRESET_LOAD_DELETED, PRESET_LOAD_SKIPPED, - PROFILE_SKILLS, - PROFILE_SKILL_ENTRY(Command.PROFILE, "skill_entry"), - PROFILE_STATS, - PROFILE_STAT_ENTRY(Command.PROFILE, "stat_entry"), + PROFILE_SKILLS_HEADER, + PROFILE_SKILLS_ENTRY, + PROFILE_STATS_HEADER, + PROFILE_STATS_ENTRY, RANK_HEADER, RANK_POWER, RANK_ENTRY, - RELOAD, + RELOAD_RELOADED, SAVE_ALREADY_SAVING(Command.SAVE, "already_saving"), SAVE_MYSQL_NOT_ENABLED(Command.SAVE, "mysql_not_enabled"), SAVE_SAVED, @@ -170,10 +170,10 @@ public enum CommandMessage implements MessageKey { UPDATELEADERBOARDS_ALREADY_UPDATING(Command.UPDATELEADERBOARDS, "already_updating"), UPDATELEADERBOARDS_UPDATED, VERSION, - XP_ADD, - XP_SET, - XP_REMOVE, - MANA_ABILITY_COOLDOWN_RESET("manaability.cooldown_reset"), + XP_ADD_ADDED, + XP_SET_SET, + XP_REMOVE_REMOVED, + MANAABILITY_RESETCOOLDOWN_COOLDOWN_RESET(Command.MANAABILITY_RESETCOOLDOWN, "cooldown_reset"), UNKNOWN_SKILL("unknown_skill"), UNKNOWN_MANA_ABILITY("unknown_mana_ability"), UNKNOWN_STAT("unknown_stat"), diff --git a/common/src/main/resources/messages/messages_en.yml b/common/src/main/resources/messages/messages_en.yml index 304bd183d..c0e6ca67d 100644 --- a/common/src/main/resources/messages/messages_en.yml +++ b/common/src/main/resources/messages/messages_en.yml @@ -334,21 +334,33 @@ commands: logs: header: "Anti-AFK logs for {player} ({count} total) | Page {page}/{total_pages}:" entry: "{timestamp} - {message}" + desc: Show anti-AFK logs for a given player. armor: modifier: add: added: "{color}{stat} modifier with level {value} was added to your item" already_exists: "An armor modifier with stat {color}{stat} already exists on your armor! Remove it first with /sk armor modifier remove" + desc: Adds an armor stat modifier to the item held, along with lore by default. remove: does_not_exist: "Your item does not have a {color}{stat} modifier!" removed: "{color}{stat} modifier was removed from your item" + desc: Removes an armor stat modifier from the item held, and the lore associated with it by default. list: header: "Armor modifiers found:" + desc: Lists all armor stat modifiers on the item held. removeall: removed: "All armor modifiers have been removed from your item" + desc: Removes all armor stat modifiers from the item held. trait: add: already_exists: "An armor modifier with trait {trait} already exists on your item! Remove it first with /sk armor trait remove" + desc: Adds an armor trait modifier to the item held, along with lore by default. + remove: + desc: Removes an armor trait modifier from the item held. + list: + desc: Lists all item trait modifiers on the item held. + removeall: + desc: Removes all armor trait modifiers from the item held. multiplier: add: added: "{target} multiplier with value {value} was added to your item" @@ -357,25 +369,33 @@ commands: skill_lore_subtract: "When worn: -{value}% {skill} XP" global_lore: "When worn: +{value}% Skill XP" global_lore_subtract: "When worn: -{value}% Skill XP" + desc: Adds an armor multiplier to the held item to global or a specific skill where value is the percent more XP gained. remove: does_not_exist: "Your item does not have a {target} armor multiplier!" removed: "{target} armor multiplier was removed from your item" + desc: Removes an armor multiplier of a the specified skill or global from the held item. list: header: "Armor multipliers found:" + desc: Lists all armor multipliers on the held item. removeall: removed: "All armor multipliers have been removed from your item" + desc: Removes all armor multipliers from the item held. requirement: add: added: "{skill} armor requirement with level {level} was added to your item" already_exists: "Item already has a {skill} armor requirement! Remove it first with /sk armor requirement remove" lore: "Requires {skill} {level}" + desc: Adds an armor requirement to the item held, along with lore by default. remove: does_not_exist: "Your item does not have a {skill} armor requirement!" removed: "{skill} armor requirement was removed from your item" + desc: Removes an armor requirement from the item held, along with the lore associated it by default. list: header: "Armor requirements found:" + desc: Lists the armor requirements on the item held. removeall: removed: "All armor requirements have been removed from your item" + desc: Removes all armor requirements from the item held. equip: "You do not meet the requirements to equip this item: {requirements}" backup: load: @@ -385,30 +405,44 @@ commands: error: "Error loading backup: {error}" must_be_yaml: "File must be a .yml file!" file_not_found: "A backup of this file name does not exist in the backups folder!" + desc: Loads a backup from a given file. save: saving: "Saving backup..." saved: "Backed up {type} data as {file}" error: "Error backing up {type} data! See error in console/below for details" + desc: Saves a backup of the current data to the backups folder. claimitems: no_items: "You have no items to claim" item: give: sender: "Gave {amount}x {key} to {player}" receiver: "You were given {amount}x {key}" + desc: Gives an item with a key from the item registry to a player. modifier: add: added: "{color}{stat} modifier with level {value} was added to your item" already_exists: "An item modifier with stat {color}{stat} already exists on your item! Remove it first with /sk item modifier remove" + desc: Adds an item stat modifier to the item held, along with lore by default. remove: does_not_exist: "Your item does not have a {color}{stat} modifier!" removed: "{color}{stat} modifier was removed from your item" + desc: Removes an item stat modifier from the item held, and the lore associated with it by default. list: header: "Item modifiers found:" + desc: Lists all item stat modifiers on the item held. removeall: removed: "All item modifiers have been removed from your item" + desc: Removes all item stat modifiers from the item held. trait: add: already_exists: "An item modifier with trait {trait} already exists on your item! Remove it first with /sk item trait remove" + desc: Adds an item trait modifier to the item held, along with lore by default. + remove: + desc: Removes an item trait modifier from the item held. + list: + desc: Lists all item trait modifiers on the item held. + removeall: + desc: Removes all item trait modifiers from the item held. multiplier: add: added: "{target} multiplier with value {value} was added to your item" @@ -417,87 +451,124 @@ commands: skill_lore_subtract: "When held: -{value}% {skill} XP" global_lore: "When held: +{value}% Skill XP" global_lore_subtract: "When held: -{value}% Skill XP" + desc: Adds an item multiplier to the held item to global or a specific skill where value is the percent more XP gained. remove: does_not_exist: "Your item does not have a {target} item multiplier!" removed: "{target} item multiplier was removed from your item" + desc: Removes an item multiplier of a the specified skill or global from the held item. list: header: "Item multipliers found:" + desc: Lists all item multipliers on the held item. removeall: removed: "All item multipliers have been removed from your item" + desc: Removes all item multipliers from the item held. register: registered: "Registered held item to key {key}" already_registered: "There is already an item registered to key {key}, use /skills item unregister to unregister it first" no_spaces: "Item key cannot contain spaces!" + desc: Registers an item to the item registry with a given key which can be referenced in plugin configuration. requirement: add: added: "{skill} item requirement with level {level} was added to your item" already_exists: "Item already has a {skill} item requirement! Remove it first with /sk item requirement remove" lore: "Requires {skill} {level}" + desc: Adds an item requirement to the item held, along with lore by default. remove: does_not_exist: "Your item does not have a {skill} item requirement!" removed: "{skill} item requirement was removed from your item" + desc: Removes an item requirement from the item held, and the lore associated with it by default. list: header: "Item requirements found:" + desc: Lists the item requirements on the item held. removeall: removed: "All item requirements have been removed from your item" + desc: Removes all item requirements from the item held. use: "You do not meet the requirements to use this item: {requirements}" unregister: unregistered: "Unregistered item with key {key}" not_registered: "There is no item registered with key {key}" + desc: Unregisters an item from the item registry with the given key ignore: - add: "Your item will now be ignored by mana ability interactions" - remove: "Your item will no longer be ignored by mana ability interactions" + add: + added: "Your item will now be ignored by mana ability interactions" + desc: Adds the tag that ignores the held item from mana ability interactions. + remove: + removed: "Your item will no longer be ignored by mana ability interactions" + desc: Removes the tag that ignores the held item from mana ability interactions. jobs: add: added: "The job {job} was successfully added to player {player}" limited: "Cannot add this job because player {player} has reached the job limit" existing: "Player {player} already has the job {job}" + desc: Adds a skill as a job for yourself or a specified player. remove: removed: "Removed job {job} from player {player}" unchanged: "Nothing was changed since player {player} does not have the job {job}" + desc: Removes a skill as a job for yourself or a specified player. removeall: removed: "Removed all jobs from player {player}" + desc: Removes all joined jobs for yourself or a specified player. lang: set: "Language set to {lang}" not_found: "Language not found!" + desc: Changes your player language. mana: display: "Your {mana_unit}: {current}/{max}" display_other: "{mana_unit} of {player}: {current}/{max}" - add: "Added {amount} {mana_unit} to player {player}" - remove: "Removed {amount} {mana_unit} from player {player}" - set: "Set player {player} to {amount} {mana_unit}" + desc: Display your or another player's current and max mana + add: + added: "Added {amount} {mana_unit} to player {player}" + desc: Adds mana to a player + remove: + removed: "Removed {amount} {mana_unit} from player {player}" + desc: Removes mana from a player + set: + set: "Set player {player} to {amount} {mana_unit}" + desc: Sets the mana of player at_least_zero: "{mana_unit} must be at least zero!" console_specify_player: "Console must specify a player!" modifier: add: added: "{color}{stat} modifier level {value} with name {name} added to player {player}" already_exists: "Modifier with name {name} already exists on player {player}! Remove it with /sk modifier remove {player} {name}" + desc: Adds a stat modifier to a player. remove: not_found: "Modifier {name} not found for player {player}" removed: "Modifier {name} removed from player {player}" + desc: Removes a specific stat modifier from a player. list: all_stats_header: "Stat modifiers for player {player}:" all_stats_entry: " {name} - {color}{stat} Level {value}" one_stat_header: "Stat modifiers ({color}{stat}) for player {player}:" one_stat_entry: " {name} - {color}{stat} Level {value}" players_only: "Only players can list their own modifiers! Try specifying a player" + desc: Lists all or a specific stat's modifiers for a player. removeall: removed_all_stats: "Removed {num} stat modifiers from player {player}" removed_one_stat: "Removed {num} {color}{stat} modifiers from player {player}" players_only: "Only players can remove their own modifiers! Try specifying a player" + desc: Removes all stat modifiers from a player. trait: add: already_exists: "Modifier with name {name} already exists on player {player}! Remove it with /sk trait remove {player} {name}" + desc: Adds a trait modifier to a player. + remove: + desc: Removes a specific trait modifier from a player. list: all_traits_header: "Trait modifiers for player {player}:" one_trait_header: "Trait modifiers ({color}{trait}) for player {player}:" + desc: Lists all or a specific trait's modifiers for a player. removeall: removed_all_traits: "Removed {num} trait modifiers from player {player}" + desc: Removes all trait modifiers from a player. multiplier: global: Global list: "Global XP multiplier for {player}: {multiplier}x / +{percent}%" skill_entry: "{skill} XP multiplier: {multiplier}x / +{percent}%" players_only: "Only players can list their own multiplier! Specify a player!" + desc: Shows a player's current XP multiplier based on their permissions. + openmenu: + desc: Opens a plugin menu for a player with optional properties JSON and page number. preset: load: confirm: "Loading a preset will override your config files! The following files will be affected (Appended, Merged, Replaced, Deleted): {entries} This action cannot be undone, manually backup any files needed. Type the command again to confirm." @@ -507,31 +578,52 @@ commands: replaced: Replaced files deleted: Deleted files skipped: Skipped files + desc: Loads a configuration preset from the presets folder. profile: - skills: "Skills profile for {name}:\nUUID: {uuid}\nSkills:{skill_entries}" - skill_entry: "\n {skill} - Level: {level}, XP: {xp}" - stats: "Stats profile for {name}:\nUUID: {uuid}\nStats:{stat_entries}" - stat_entry: "\n {stat} - Total Level: {total_level}, Base Level: {base_level}, Modified Level: {modified_level}" + skills: + header: "Skills profile for {name}:\nUUID: {uuid}\nSkills:{skill_entries}" + entry: "\n {skill} - Level: {level}, XP: {xp}" + desc: Shows the skill levels and XP for any player, including offline players. + stats: + header: "Stats profile for {name}:\nUUID: {uuid}\nStats:{stat_entries}" + entry: "\n {stat} - Total Level: {total_level}, Base Level: {base_level}, Modified Level: {modified_level}" + desc: Shows the stat levels for any player, including offline players. rank: header: "Your Skill Rankings" power: "Power (All Skills): #{rank} of {total}" entry: "{skill}: #{rank} of {total}" - reload: "Config reloaded!" + desc: Shows your skill rankings. + reload: + reloaded: "Config reloaded!" + desc: Reloads the config, messages, menus, loot tables, action bars, boss bars, and health and luck stats. + resethealth: + desc: Removes all attribute modifiers by AuraSkills for easy uninstalling. This only works on offline players. save: already_saving: "Data is already saving!" mysql_not_enabled: "MySQL was not enabled at server startup, saving to file instead!" saved: "Skill data saved!" + desc: Saves skill data. skill: setall: set: "All skills set to level {level} for player {player}" + desc: Sets all of a player's skills to a level. setlevel: set: "Skill {skill} set to level {level} for player {player}" + desc: Sets a specific skill to a level for a player. + reset: + desc: Resets all skills or a specific skill to the starting level for a player. at_least: "Level must be at least {level}!" + skills: + desc: Opens the Skills menu, where you can browse skills, progress, and abilities. + stats: + desc: Opens the Stats menu where you can see current stat levels and descriptions. toggle: enabled: "Your skills action bar has been enabled" disabled: "Your skills action bar has been disabled" not_enabled: "Skills action bar is not enabled on this server!" + desc: Toggles your own skills action bar. top: + desc: Shows the top players in a skill power_header: "--==All Skills Leaderboard==--" power_header_page: "--==All Skills Leaderboard(Page {page})==--" skill_header: "--=={skill} Leaderboard==--" @@ -545,13 +637,22 @@ commands: updateleaderboards: already_updating: "Leaderboard is already updating!" updated: "Leaderboard updated!" + desc: Updates and sorts the leaderboards. version: "You are on AuraSkills {current_version}. The latest version is {latest_version}" xp: - add: "Added {amount} {skill} XP to player {player}" - set: "Set {skill} XP for player {player} to {amount}" - remove: "Removed {amount} {skill} XP from player {player}" + add: + added: "Added {amount} {skill} XP to player {player}" + desc: Adds skill XP to a player for a certain skill. + set: + set: "Set {skill} XP for player {player} to {amount}" + desc: Sets a player's skill XP for a certain skill to an amount. + remove: + removed: "Removed {amount} {skill} XP from player {player}" + desc: Removes skill XP from a player in a certain skill. manaability: - cooldown_reset: "Cooldown for {ability} has been reset for player {player}" + resetcooldown: + cooldown_reset: "Cooldown for {ability} has been reset for player {player}" + desc: Resets a specific mana ability cooldown for a player, optionally filling up mana. unknown_skill: "Unknown skill!" unknown_mana_ability: "Unknown mana ability!" unknown_stat: "Unknown stat!" @@ -890,4 +991,4 @@ units: mana: Mana hp: HP xp: XP -file_version: 35 \ No newline at end of file +file_version: 36