mirror of
https://github.com/BentoBoxWorld/Limits.git
synced 2024-11-29 06:05:12 +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
|
||||
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));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user