fix error trying to give modify players that never joined
This commit is contained in:
parent
e80e8f4a62
commit
3832a7268c
@ -276,7 +276,7 @@ public class PlayerClaimData {
|
||||
reader.close();
|
||||
if (obj == null)
|
||||
obj = new JsonObject();
|
||||
int additionalBlocks = obj.get("AdditionalBlocks").getAsInt();
|
||||
int additionalBlocks = ConfigHandler.fromJson(obj, "AdditionalBlocks", 0);
|
||||
obj.addProperty("AdditionalBlocks", additionalBlocks + additionalClaimBlocks);
|
||||
Flan.debug("Attempting to write following json data {} to file {}", obj, file.getName());
|
||||
FileWriter writer = new FileWriter(file);
|
||||
@ -287,6 +287,8 @@ public class PlayerClaimData {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
private int calculateUsedClaimBlocks() {
|
||||
int usedClaimsBlocks = 0;
|
||||
for (ServerWorld world : this.player.getServer().getWorlds()) {
|
||||
|
Loading…
Reference in New Issue
Block a user