mirror of
https://github.com/BentoBoxWorld/Limits.git
synced 2024-11-25 20:16:11 +01:00
Added null checks
This commit is contained in:
parent
c0c9e16b6c
commit
19565e90ff
@ -115,10 +115,10 @@ public class JoinListener implements Listener {
|
|||||||
// Material limit
|
// Material limit
|
||||||
ibc.setBlockLimit(m, Math.max(ibc.getBlockLimit(m), value));
|
ibc.setBlockLimit(m, Math.max(ibc.getBlockLimit(m), value));
|
||||||
} else {
|
} else {
|
||||||
if (m.isBlock()) {
|
if (m != null && m.isBlock()) {
|
||||||
// Material limit
|
// Material limit
|
||||||
ibc.setBlockLimit(m, Math.max(ibc.getBlockLimit(m), value));
|
ibc.setBlockLimit(m, Math.max(ibc.getBlockLimit(m), value));
|
||||||
} else {
|
} else if (et != null){
|
||||||
// This is an entity setting
|
// This is an entity setting
|
||||||
ibc.setEntityLimit(et, Math.max(ibc.getEntityLimit(et), value));
|
ibc.setEntityLimit(et, Math.max(ibc.getEntityLimit(et), value));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user