From 4b9c250321af43066fb9a9ced07f403c88daed49 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Fri, 11 Jun 2021 17:24:45 +1000 Subject: [PATCH] Fix NPE with World.getNearbyEntities By: md_5 --- .../src/main/java/org/bukkit/craftbukkit/CraftWorld.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftWorld.java index 0f79445f6f..b07127a21e 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -1,6 +1,7 @@ package org.bukkit.craftbukkit; import com.google.common.base.Preconditions; +import com.google.common.base.Predicates; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import it.unimi.dsi.fastutil.longs.Long2ObjectLinkedOpenHashMap; @@ -1102,7 +1103,7 @@ public class CraftWorld implements World { Validate.notNull(boundingBox, "Bounding box is null!"); AxisAlignedBB bb = new AxisAlignedBB(boundingBox.getMinX(), boundingBox.getMinY(), boundingBox.getMinZ(), boundingBox.getMaxX(), boundingBox.getMaxY(), boundingBox.getMaxZ()); - List entityList = getHandle().getEntities((net.minecraft.world.entity.Entity) null, bb, null); + List entityList = getHandle().getEntities((net.minecraft.world.entity.Entity) null, bb, Predicates.alwaysTrue()); List bukkitEntityList = new ArrayList(entityList.size()); for (net.minecraft.world.entity.Entity entity : entityList) {