aboutsummaryrefslogtreecommitdiff
path: root/spark-bukkit/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'spark-bukkit/src/main')
-rw-r--r--spark-bukkit/src/main/java/me/lucko/spark/bukkit/BukkitWorldInfoProvider.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/spark-bukkit/src/main/java/me/lucko/spark/bukkit/BukkitWorldInfoProvider.java b/spark-bukkit/src/main/java/me/lucko/spark/bukkit/BukkitWorldInfoProvider.java
index 5d50eeb..79c2715 100644
--- a/spark-bukkit/src/main/java/me/lucko/spark/bukkit/BukkitWorldInfoProvider.java
+++ b/spark-bukkit/src/main/java/me/lucko/spark/bukkit/BukkitWorldInfoProvider.java
@@ -49,7 +49,9 @@ public class BukkitWorldInfoProvider implements WorldInfoProvider {
List<BukkitChunkInfo> list = new ArrayList<>(chunks.length);
for (Chunk chunk : chunks) {
- list.add(new BukkitChunkInfo(chunk));
+ if (chunk != null) {
+ list.add(new BukkitChunkInfo(chunk));
+ }
}
data.put(world.getName(), list);
@@ -66,7 +68,9 @@ public class BukkitWorldInfoProvider implements WorldInfoProvider {
this.entityCounts = new CountMap.EnumKeyed<>(EntityType.class);
for (Entity entity : chunk.getEntities()) {
- this.entityCounts.increment(entity.getType());
+ if (entity != null) {
+ this.entityCounts.increment(entity.getType());
+ }
}
}