Fixed setting instead of adding points

This commit is contained in:
Teriuihi 2021-12-23 22:57:50 +01:00
parent 1feff9e412
commit 451597ca59

View File

@ -41,9 +41,9 @@ public class EconUser {
if (Config.DEBUG) if (Config.DEBUG)
Logger.info("Adding % points to % for %", String.valueOf(points), villagerType, uuid.toString()); Logger.info("Adding % points to % for %", String.valueOf(points), villagerType, uuid.toString());
if (pointsMap.containsKey(villagerType)) if (pointsMap.containsKey(villagerType))
pointsMap.put(villagerType, points); pointsMap.put(villagerType,pointsMap.get(villagerType) + points);
else else
pointsMap.put(villagerType, Objects.requireNonNullElse(pointsMap.get(villagerType), 0) + points); pointsMap.put(villagerType, points);
} }
public void syncPoints() { public void syncPoints() {