Skip to content

Commit

Permalink
prevent NPE for blockCounts.
Browse files Browse the repository at this point in the history
  • Loading branch information
tastybento committed Sep 11, 2021
1 parent 390814b commit b717008
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ public void setUniqueId(String uniqueId) {
* @return the blockCount
*/
public Map<Material, Integer> getBlockCounts() {
if (blockCounts == null) {
blockCounts = new EnumMap<>(Material.class);
}
return blockCounts;
}

Expand Down

0 comments on commit b717008

Please sign in to comment.