Debug /mmocore admin exp take <profession>

This commit is contained in:
Ka0rX 2023-01-04 13:01:38 +01:00
parent 3a3812480f
commit e7815b09f2

View File

@ -171,7 +171,7 @@ public class PlayerProfessions {
public void giveExperience(Profession profession, double value, EXPSource source, @Nullable Location hologramLocation, boolean splitExp) {
Validate.isTrue(playerData.isOnline(), "Cannot give experience to offline player");
if (value <= 0) {
exp.put(profession.getId(), Math.max(0, exp.get(profession.getId() + value)));
exp.put(profession.getId(), Math.max(0, exp.get(profession.getId()) + value));
return;
}