mirror of
https://github.com/BentoBoxWorld/Limits.git
synced 2024-09-27 06:02:44 +02:00
Adds null check for nether and end worlds
https://github.com/BentoBoxWorld/Limits/issues/64
This commit is contained in:
parent
65a31c9308
commit
1bc354e49b
@ -141,13 +141,13 @@ public class LimitPanel {
|
|||||||
.filter(e -> e.getType().equals(ent))
|
.filter(e -> e.getType().equals(ent))
|
||||||
.filter(e -> island.inIslandSpace(e.getLocation())).count();
|
.filter(e -> island.inIslandSpace(e.getLocation())).count();
|
||||||
// Nether
|
// Nether
|
||||||
if (addon.getPlugin().getIWM().isNetherIslands(island.getWorld())) {
|
if (addon.getPlugin().getIWM().isNetherIslands(island.getWorld()) && addon.getPlugin().getIWM().getNetherWorld(island.getWorld()) != null) {
|
||||||
count += addon.getPlugin().getIWM().getNetherWorld(island.getWorld()).getEntities().stream()
|
count += addon.getPlugin().getIWM().getNetherWorld(island.getWorld()).getEntities().stream()
|
||||||
.filter(e -> e.getType().equals(ent))
|
.filter(e -> e.getType().equals(ent))
|
||||||
.filter(e -> island.inIslandSpace(e.getLocation())).count();
|
.filter(e -> island.inIslandSpace(e.getLocation())).count();
|
||||||
}
|
}
|
||||||
// End
|
// End
|
||||||
if (addon.getPlugin().getIWM().isEndIslands(island.getWorld())) {
|
if (addon.getPlugin().getIWM().isEndIslands(island.getWorld()) && addon.getPlugin().getIWM().getEndWorld(island.getWorld()) != null) {
|
||||||
count += addon.getPlugin().getIWM().getEndWorld(island.getWorld()).getEntities().stream()
|
count += addon.getPlugin().getIWM().getEndWorld(island.getWorld()).getEntities().stream()
|
||||||
.filter(e -> e.getType().equals(ent))
|
.filter(e -> e.getType().equals(ent))
|
||||||
.filter(e -> island.inIslandSpace(e.getLocation())).count();
|
.filter(e -> island.inIslandSpace(e.getLocation())).count();
|
||||||
|
Loading…
Reference in New Issue
Block a user