Added null checks

This commit is contained in:
tastybento 2020-11-14 12:02:48 -08:00
parent c0c9e16b6c
commit 19565e90ff

View File

@ -115,10 +115,10 @@ public class JoinListener implements Listener {
// 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));
}