From 59cb8594b4eb5cad4b2cba38ed7b6056db854f78 Mon Sep 17 00:00:00 2001 From: Jules Date: Sat, 15 Oct 2022 12:55:57 +0200 Subject: [PATCH] Fixed an issue with skill loading --- .../main/java/net/Indyuce/mmoitems/skill/RegisteredSkill.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/skill/RegisteredSkill.java b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/skill/RegisteredSkill.java index 30d25992..843a1f40 100644 --- a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/skill/RegisteredSkill.java +++ b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/skill/RegisteredSkill.java @@ -1,5 +1,6 @@ package net.Indyuce.mmoitems.skill; +import io.lumine.mythic.lib.UtilityMethods; import io.lumine.mythic.lib.skill.handler.SkillHandler; import org.bukkit.configuration.ConfigurationSection; import org.jetbrains.annotations.NotNull; @@ -20,7 +21,7 @@ public class RegisteredSkill { this.name = Objects.requireNonNull(config.getString("name"), "Could not fill skill name"); for (String mod : handler.getModifiers()) { - modifierNames.put(mod, Objects.requireNonNull(config.getString("modifier." + mod + ".name"), "Could not find translation for modifier '" + mod + "'")); + modifierNames.put(mod, config.getString("modifier." + mod + ".name", UtilityMethods.caseOnWords(mod.replace("_", " ").replace("-", " ").toLowerCase()))); modifierDefaultValues.put(mod, config.getDouble("modifier." + mod + ".default-value")); } }