Skip to content

Commit

Permalink
Added null checks
Browse files Browse the repository at this point in the history
  • Loading branch information
tastybento committed Nov 14, 2020
1 parent c0c9e16 commit 19565e9
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@ private void checkPerms(Player player, String permissionPrefix, String islandId,
// Material limit
ibc.setBlockLimit(m, Math.max(ibc.getBlockLimit(m), value));
} else {
if (m.isBlock()) {
if (m != null && m.isBlock()) {
// Material limit
ibc.setBlockLimit(m, Math.max(ibc.getBlockLimit(m), value));
} else {
} else if (et != null){
// This is an entity setting
ibc.setEntityLimit(et, Math.max(ibc.getEntityLimit(et), value));
}
Expand Down

0 comments on commit 19565e9

Please sign in to comment.