From b47564ef43f5bd55a74d9bdef99b5c87a0b4568e Mon Sep 17 00:00:00 2001 From: Vincent Bolta Date: Sun, 24 Jan 2021 20:54:18 +0100 Subject: [PATCH] Fix issue with skill and stat levels not being detected properly. --- .../pluginlibrary/autorank/hooks/AureliumSkillsHook.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/me/staartvin/utils/pluginlibrary/autorank/hooks/AureliumSkillsHook.java b/src/me/staartvin/utils/pluginlibrary/autorank/hooks/AureliumSkillsHook.java index 44c32d3..b5cacb1 100644 --- a/src/me/staartvin/utils/pluginlibrary/autorank/hooks/AureliumSkillsHook.java +++ b/src/me/staartvin/utils/pluginlibrary/autorank/hooks/AureliumSkillsHook.java @@ -5,6 +5,7 @@ import com.archyx.aureliumskills.stats.Stat; import me.staartvin.utils.pluginlibrary.autorank.Library; +import java.util.Locale; import java.util.UUID; /** @@ -48,7 +49,7 @@ public double getStatLevel(UUID uuid, String statType) { Stat stat = null; try { - stat = Stat.valueOf(statType); + stat = Stat.valueOf(statType.toUpperCase(Locale.ROOT)); } catch (Exception e) { return 0; } @@ -68,11 +69,12 @@ public int getSkillLevel(UUID uuid, String skillName) { Skill skill = null; try { - skill = Skill.valueOf(skillName); + skill = Skill.valueOf(skillName.toUpperCase(Locale.ROOT)); } catch (Exception e) { return 0; } + return AureliumAPI.getSkillLevel(uuid, skill); } @@ -87,7 +89,7 @@ public double getXP(UUID uuid, String skillName) { Skill skill = null; try { - skill = Skill.valueOf(skillName); + skill = Skill.valueOf(skillName.toUpperCase(Locale.ROOT)); } catch (Exception e) { return 0; }