mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-06 02:35:49 +01:00
Fix NPE with World.getNearbyEntities
By: md_5 <git@md-5.net>
This commit is contained in:
parent
fcf15f1048
commit
4b9c250321
1 changed files with 2 additions and 1 deletions
|
@ -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<net.minecraft.world.entity.Entity> entityList = getHandle().getEntities((net.minecraft.world.entity.Entity) null, bb, null);
|
||||
List<net.minecraft.world.entity.Entity> entityList = getHandle().getEntities((net.minecraft.world.entity.Entity) null, bb, Predicates.alwaysTrue());
|
||||
List<Entity> bukkitEntityList = new ArrayList<org.bukkit.entity.Entity>(entityList.size());
|
||||
|
||||
for (net.minecraft.world.entity.Entity entity : entityList) {
|
||||
|
|
Loading…
Reference in a new issue