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)
Logger.info("Adding % points to % for %", String.valueOf(points), villagerType, uuid.toString());
if (pointsMap.containsKey(villagerType))
pointsMap.put(villagerType, points);
pointsMap.put(villagerType,pointsMap.get(villagerType) + points);
else
pointsMap.put(villagerType, Objects.requireNonNullElse(pointsMap.get(villagerType), 0) + points);
pointsMap.put(villagerType, points);
}
public void syncPoints() {