aboutsummaryrefslogtreecommitdiff
path: root/spark-common/src/main/java/me
diff options
context:
space:
mode:
authorLuck <git@lucko.me>2022-06-29 22:44:30 +0100
committerLuck <git@lucko.me>2022-06-29 22:44:30 +0100
commita10f966a443d56845a5efb1e65232e6b87eabb96 (patch)
tree31807bdafc513068ad57f097c4ca296820a2bc58 /spark-common/src/main/java/me
parent2b24d42ab2b9a9c28a5929520d9ca565f07724f9 (diff)
downloadspark-a10f966a443d56845a5efb1e65232e6b87eabb96.tar.gz
spark-a10f966a443d56845a5efb1e65232e6b87eabb96.tar.bz2
spark-a10f966a443d56845a5efb1e65232e6b87eabb96.zip
Fix NPE from null entity type name
Diffstat (limited to 'spark-common/src/main/java/me')
-rw-r--r--spark-common/src/main/java/me/lucko/spark/common/platform/world/WorldStatisticsProvider.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/spark-common/src/main/java/me/lucko/spark/common/platform/world/WorldStatisticsProvider.java b/spark-common/src/main/java/me/lucko/spark/common/platform/world/WorldStatisticsProvider.java
index 864a296..80c35a6 100644
--- a/spark-common/src/main/java/me/lucko/spark/common/platform/world/WorldStatisticsProvider.java
+++ b/spark-common/src/main/java/me/lucko/spark/common/platform/world/WorldStatisticsProvider.java
@@ -122,6 +122,10 @@ public class WorldStatisticsProvider {
String name = chunk.entityTypeName(key);
int count = value.get();
+ if (name == null) {
+ name = "unknown[" + key.toString() + "]";
+ }
+
builder.putEntityCounts(name, count);
combined.add(name, count);
});