From db7af7d44b94945aae15b86b71d4e2ea902f3506 Mon Sep 17 00:00:00 2001 From: Auxilor Date: Thu, 18 May 2023 14:47:14 +0100 Subject: [PATCH] Extra check to SkillLevelMap --- .../main/kotlin/com/willfp/ecoskills/skills/SkillLevelMap.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/skills/SkillLevelMap.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/skills/SkillLevelMap.kt index e97a649..415a29a 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/skills/SkillLevelMap.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/skills/SkillLevelMap.kt @@ -31,7 +31,7 @@ class SkillLevelMap( val required = skill.getXPRequired(current.level) - return if (current.xp + xp >= required) { + return if (current.xp + xp >= required && current.level < skill.maxLevel) { val overshoot = current.xp + xp - required this[skill] = SkillLevel(