Dont try removing player entity

This commit is contained in:
Jesse Boyd 2019-04-01 20:39:49 +11:00
parent 321ba326ed
commit a636a30e9f
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F

View File

@ -22,6 +22,7 @@ import java.util.Map;
import java.util.Set; import java.util.Set;
import java.util.UUID; import java.util.UUID;
import com.sk89q.worldedit.entity.Player;
import com.sk89q.worldedit.world.block.BaseBlock; import com.sk89q.worldedit.world.block.BaseBlock;
import com.sk89q.worldedit.world.block.BlockStateHolder; import com.sk89q.worldedit.world.block.BlockStateHolder;
import com.sk89q.worldedit.world.block.BlockType; import com.sk89q.worldedit.world.block.BlockType;
@ -157,7 +158,7 @@ public class BukkitChunk_All extends IntFaweChunk<Chunk, BukkitQueue_All> {
HashSet<UUID> entsToRemove = this.getEntityRemoves(); HashSet<UUID> entsToRemove = this.getEntityRemoves();
if (!entsToRemove.isEmpty()) { if (!entsToRemove.isEmpty()) {
for (Entity entity : chunk.getEntities()) { for (Entity entity : chunk.getEntities()) {
if (entsToRemove.contains(entity.getUniqueId())) { if (entsToRemove.contains(entity.getUniqueId()) && !(entity instanceof Player)) {
entity.remove(); entity.remove();
} }
} }