Skip to content

Commit

Permalink
- Fix potential NPE when loading empty cooldowns.json making Towny
Browse files Browse the repository at this point in the history
unable to load.
  • Loading branch information
LlmDl committed Mar 27, 2024
1 parent 16413ed commit fc55bf2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2551,7 +2551,7 @@ public boolean loadCooldowns() {
CooldownTimerTask.getCooldowns().putAll(new Gson().fromJson(data, new TypeToken<Map<String, Long>>(){}.getType()));
} catch (JsonSyntaxException e) {
logger.warn("Could not load saved cooldowns due to a json syntax exception", e);
}
} catch (NullPointerException ignored) {}

return true;
}
Expand Down
3 changes: 2 additions & 1 deletion Towny/src/main/resources/ChangeLog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9671,4 +9671,5 @@ v0.92.0.11:
- Requires the towny.command.plot.asmayor permission node.
0.100.1.24:
- Fix minimum_amount_of_residents_in_town_for_outpost being used while limit_outposts_using_town_and_nation_levels is also true.
- While you limit your outposts by the town/nation levels Towny will ignore any minimum_amount_of_residents_in_town_for_outpost value.
- While you limit your outposts by the town/nation levels Towny will ignore any minimum_amount_of_residents_in_town_for_outpost value.
- Fix potential NPE when loading empty cooldowns.json making Towny unable to load.

0 comments on commit fc55bf2

Please sign in to comment.