diff --git a/src/main/java/net/lyof/sortilege/utils/XPHelper.java b/src/main/java/net/lyof/sortilege/utils/XPHelper.java index 7ffde39..572b778 100644 --- a/src/main/java/net/lyof/sortilege/utils/XPHelper.java +++ b/src/main/java/net/lyof/sortilege/utils/XPHelper.java @@ -43,7 +43,7 @@ public static int getTotalxp(int level, float progress, ServerLevel server) { if (totalxpCache.containsKey(level)) { dummy.experienceLevel = level; - return (int) (totalxpCache.get(level) + dummy.getXpNeededForNextLevel() * progress); + total += dummy.getXpNeededForNextLevel() * (i == level ? progress : 1); } for (int i = 0; i <= level; i++) {