mirror of
https://hub.spigotmc.org/stash/scm/spigot/craftbukkit.git
synced 2025-08-21 05:44:33 +00:00
Fix NPE with World.getNearbyEntities
This commit is contained in:
parent
4d2c780090
commit
d747f8ed15
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…
Add table
Reference in a new issue