Fixed setting instead of adding points
This commit is contained in:
parent
1feff9e412
commit
451597ca59
|
|
@ -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() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user