mirror of
https://gitlab.com/phoenix-dvpmt/mmocore.git
synced 2025-11-18 06:24:17 +01:00
Fixed player data save bug when hitting max class level
This commit is contained in:
parent
c712f82bf2
commit
6286c3d201
@ -116,7 +116,6 @@ public class PlayerClass implements ExperienceObject, PreloadedObject {
|
||||
expCurve = ExperienceCurve.fromConfig(config.getString("exp-curve"));
|
||||
} catch (Throwable exception) {
|
||||
MMOCore.log(Level.WARNING, "Could not load exp curve from class '" + id + "': " + exception.getMessage());
|
||||
exception.printStackTrace();
|
||||
}
|
||||
this.expCurve = expCurve;
|
||||
|
||||
|
||||
@ -52,7 +52,7 @@ public class ListExperienceCurve implements ExperienceCurve {
|
||||
|
||||
@Override
|
||||
public long getExperience(@NotNull PlayerData player, int level) {
|
||||
Validate.isTrue(level > 0, "Level must be stricly positive");
|
||||
return experience.get(Math.min(level, experience.size()));
|
||||
Validate.isTrue(level > 0, "Level must be strictly positive");
|
||||
return experience.get(Math.min(level, experience.size()) - 1);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user