From afbadc7dabb8a63c1b1e1694b27acad9f7b411fc Mon Sep 17 00:00:00 2001 From: Soapiee <75369624+Soapiee@users.noreply.github.com> Date: Wed, 15 Apr 2026 18:56:22 +0100 Subject: [PATCH 1/4] Changed reward_invalid_vault_hook message --- .../me/soapiee/biomemastery/logic/rewards/RewardFactory.java | 2 +- core/src/main/java/me/soapiee/biomemastery/utils/Message.java | 2 +- core/src/main/resources/language/lang_de.yml | 2 +- core/src/main/resources/language/lang_en.yml | 2 +- core/src/main/resources/language/lang_es.yml | 2 +- core/src/main/resources/language/lang_fr.yml | 2 +- core/src/main/resources/language/lang_nl.yml | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/core/src/main/java/me/soapiee/biomemastery/logic/rewards/RewardFactory.java b/core/src/main/java/me/soapiee/biomemastery/logic/rewards/RewardFactory.java index 75a5314..9273e0d 100644 --- a/core/src/main/java/me/soapiee/biomemastery/logic/rewards/RewardFactory.java +++ b/core/src/main/java/me/soapiee/biomemastery/logic/rewards/RewardFactory.java @@ -249,7 +249,7 @@ private void createLog(String path, Exception error, Message invalidObject) { messageManager.getWithPlaceholder( Message.INVALIDREWARD, pathParts[1], - pathParts[2], + (pathParts[2].equalsIgnoreCase("levels") ? pathParts[3] : pathParts[2]), invalidObject)); } } diff --git a/core/src/main/java/me/soapiee/biomemastery/utils/Message.java b/core/src/main/java/me/soapiee/biomemastery/utils/Message.java index 8b84ebe..abd7442 100644 --- a/core/src/main/java/me/soapiee/biomemastery/utils/Message.java +++ b/core/src/main/java/me/soapiee/biomemastery/utils/Message.java @@ -56,7 +56,7 @@ public enum Message { INVALIDPOTIONAMP("invalid_field_potion_amplifier", "potion amplifier value"), INVALIDPOTIONTYPE("invalid_field_potion_type", "potion type"), INVALIDEFFECTTYPE("invalid_field_effect_type", "effect type"), - INVALIDVAULTHOOK("reward_invalid_vault_hook", "vault hook"), + INVALIDVAULTHOOK("reward_invalid_vault_hook", "reward, due to vault not being installed"), INVALIDAMOUNT("invalid_field_amount", "amount"), INVALIDQUANTITY("invalid_field_quantity", "quantity"), INVALIDMATERIAL("invalid_field_material", "material"), diff --git a/core/src/main/resources/language/lang_de.yml b/core/src/main/resources/language/lang_de.yml index 1262a89..6ea1509 100644 --- a/core/src/main/resources/language/lang_de.yml +++ b/core/src/main/resources/language/lang_de.yml @@ -54,7 +54,7 @@ invalid_field_reward_type: "&cBiom %biome% auf Level %config_level% hat einen un invalid_field_potion_amplifier: "Trank-Verstärker Wert" invalid_field_potion_type: "Trank-Typ" invalid_field_effect_type: "Effekt-Typ" -reward_invalid_vault_hook: "Vault-Verbindung" +reward_invalid_vault_hook: "Belohnung, da Vault nicht installiert ist" invalid_field_amount: "Menge" invalid_field_quantity: "Anzahl" invalid_field_material: "Material" diff --git a/core/src/main/resources/language/lang_en.yml b/core/src/main/resources/language/lang_en.yml index 00a0448..4f6f6ba 100644 --- a/core/src/main/resources/language/lang_en.yml +++ b/core/src/main/resources/language/lang_en.yml @@ -54,7 +54,7 @@ invalid_field_reward_type: "&cBiome %biome% at level %config_level% has an inval invalid_field_potion_amplifier: "potion amplifier value" invalid_field_potion_type: "potion type" invalid_field_effect_type: "effect type" -reward_invalid_vault_hook: "vault hook" +reward_invalid_vault_hook: "reward, due to vault not being installed" invalid_field_amount: "amount" invalid_field_quantity: "quantity" invalid_field_material: "material" diff --git a/core/src/main/resources/language/lang_es.yml b/core/src/main/resources/language/lang_es.yml index 0f9aba0..1868a09 100644 --- a/core/src/main/resources/language/lang_es.yml +++ b/core/src/main/resources/language/lang_es.yml @@ -54,7 +54,7 @@ invalid_field_reward_type: "&cEl bioma %biome% en el nivel %config_level% tiene invalid_field_potion_amplifier: "valor del amplificador de poción" invalid_field_potion_type: "tipo de poción" invalid_field_effect_type: "tipo de efecto" -reward_invalid_vault_hook: "conexión con vault" +reward_invalid_vault_hook: "recompensa, debido a que Vault no está instalado" invalid_field_amount: "cantidad" invalid_field_quantity: "cantidad" invalid_field_material: "material" diff --git a/core/src/main/resources/language/lang_fr.yml b/core/src/main/resources/language/lang_fr.yml index a1c9d84..62da258 100644 --- a/core/src/main/resources/language/lang_fr.yml +++ b/core/src/main/resources/language/lang_fr.yml @@ -54,7 +54,7 @@ invalid_field_reward_type: "&cle biome %biome% au niveau %config_level% a un typ invalid_field_potion_amplifier: "valeur de l'amplificateur de potion" invalid_field_potion_type: "type de potion" invalid_field_effect_type: "type d'effet" -reward_invalid_vault_hook: "liaison vault" +reward_invalid_vault_hook: "récompense, car Vault n'est pas installé" invalid_field_amount: "montant" invalid_field_quantity: "quantité" invalid_field_material: "matériau" diff --git a/core/src/main/resources/language/lang_nl.yml b/core/src/main/resources/language/lang_nl.yml index 4d7c266..cc85d24 100644 --- a/core/src/main/resources/language/lang_nl.yml +++ b/core/src/main/resources/language/lang_nl.yml @@ -54,7 +54,7 @@ invalid_field_reward_type: "&cBioom %biome% op niveau %config_level% heeft een o invalid_field_potion_amplifier: "drankversterkingswaarde" invalid_field_potion_type: "dranktype" invalid_field_effect_type: "effecttype" -reward_invalid_vault_hook: "vault-koppeling" +reward_invalid_vault_hook: "beloning, omdat Vault niet geïnstalleerd is" invalid_field_amount: "aantal" invalid_field_quantity: "hoeveelheid" invalid_field_material: "materiaal" From f678457a4e560322059e5a436014543689a37b3d Mon Sep 17 00:00:00 2001 From: Soapiee <75369624+Soapiee@users.noreply.github.com> Date: Wed, 15 Apr 2026 19:01:30 +0100 Subject: [PATCH 2/4] ListSub now requires 2 args minimum --- .../me/soapiee/biomemastery/commands/adminCmds/ListSub.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/me/soapiee/biomemastery/commands/adminCmds/ListSub.java b/core/src/main/java/me/soapiee/biomemastery/commands/adminCmds/ListSub.java index 8bfdf8a..79cd083 100644 --- a/core/src/main/java/me/soapiee/biomemastery/commands/adminCmds/ListSub.java +++ b/core/src/main/java/me/soapiee/biomemastery/commands/adminCmds/ListSub.java @@ -19,7 +19,7 @@ public class ListSub extends AbstractAdminSub { @Getter private final String IDENTIFIER = "list"; public ListSub(BiomeMastery main) { - super(main, null, 1, 2); + super(main, null, 2, 2); } // /abm list worlds From 70f43700d083e98bf280e53eea8ea9c86fa73b73 Mon Sep 17 00:00:00 2001 From: Soapiee <75369624+Soapiee@users.noreply.github.com> Date: Wed, 15 Apr 2026 19:08:28 +0100 Subject: [PATCH 3/4] Removed support for the legacy message system --- .../biomemastery/manager/MessageManager.java | 26 ++----------------- 1 file changed, 2 insertions(+), 24 deletions(-) diff --git a/core/src/main/java/me/soapiee/biomemastery/manager/MessageManager.java b/core/src/main/java/me/soapiee/biomemastery/manager/MessageManager.java index 4d05683..7e9158f 100644 --- a/core/src/main/java/me/soapiee/biomemastery/manager/MessageManager.java +++ b/core/src/main/java/me/soapiee/biomemastery/manager/MessageManager.java @@ -8,7 +8,6 @@ import me.soapiee.biomemastery.utils.Languages; import me.soapiee.biomemastery.utils.Message; import me.soapiee.biomemastery.utils.Utils; -import org.bukkit.ChatColor; import org.bukkit.command.CommandSender; import org.bukkit.configuration.file.YamlConfiguration; @@ -25,17 +24,11 @@ public class MessageManager { public MessageManager(BiomeMastery main) { this.main = main; - //TODO: Revert code back in future updates -// file = new File(main.getDataFolder() + File.separator + "language", language + ".yml"); -// contents = new YamlConfiguration(); - -// load(null); - String languageString = validateLanguage(); if (languageString == null) language = Languages.LANG_EN.toString().toLowerCase(); else language = languageString; - file = getFile(); + file = new File(main.getDataFolder() + File.separator + "language", language + ".yml"); contents = new YamlConfiguration(); load(null); @@ -43,20 +36,6 @@ public MessageManager(BiomeMastery main) { if (languageString == null) Utils.consoleMsg(get(Message.INVALIDLANGUAGE)); } - private File getFile() { - File newLangFile = new File(main.getDataFolder() + File.separator + "language", language + ".yml"); - if (!newLangFile.exists()) main.saveResource("language" + File.separator + language + ".yml", false); - - File legacyFile = new File(main.getDataFolder() + File.separator + "messages.yml"); - if (legacyFile.exists()) { - Utils.consoleMsg(ChatColor.RED.toString() + ChatColor.BOLD + "[IMPORTANT] " + ChatColor.RESET - + ChatColor.RED + "Please transfer the contents of your messages.yml file to the new language file. Located in the \"language\" folder. Then delete the messages.yml file"); - return legacyFile; - } - - return newLangFile; - } - private String validateLanguage() { String configString = main.getConfig().getString("settings.language", "lang_en"); @@ -71,8 +50,7 @@ private String validateLanguage() { } public boolean load(CommandSender sender) { - //TODO: Revert code back in future updates -// if (!file.exists()) main.saveResource("language" + File.separator + language + ".yml", false); + if (!file.exists()) main.saveResource("language" + File.separator + language + ".yml", false); try { contents.load(file); From a45aba20cfa43bc66e9e212d7a85944955f7a781 Mon Sep 17 00:00:00 2001 From: Soapiee <75369624+Soapiee@users.noreply.github.com> Date: Wed, 15 Apr 2026 19:33:05 +0100 Subject: [PATCH 4/4] Fixed the `/biome info ` command --- .../main/java/me/soapiee/biomemastery/commands/UsageCmd.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/me/soapiee/biomemastery/commands/UsageCmd.java b/core/src/main/java/me/soapiee/biomemastery/commands/UsageCmd.java index 68caaf2..5ea11f1 100644 --- a/core/src/main/java/me/soapiee/biomemastery/commands/UsageCmd.java +++ b/core/src/main/java/me/soapiee/biomemastery/commands/UsageCmd.java @@ -93,7 +93,7 @@ private boolean validatePage(String value) { private boolean validateBiome(String value) { try { - Biome.valueOf(value); + Biome.valueOf(value.toUpperCase()); } catch (IllegalArgumentException | NullPointerException ignored) { return false; }