prevent NPE for blockCounts.

This commit is contained in:
tastybento 2021-09-11 07:45:09 -07:00
parent 390814bedb
commit b71700895e
1 changed files with 3 additions and 0 deletions

View File

@ -78,6 +78,9 @@ public class IslandBlockCount implements DataObject {
* @return the blockCount
*/
public Map<Material, Integer> getBlockCounts() {
if (blockCounts == null) {
blockCounts = new EnumMap<>(Material.class);
}
return blockCounts;
}