From 9a7ce84e1cbcea334270d8b9e4b7ac2eb3c6f30e Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Mon, 7 May 2018 10:20:13 +1000 Subject: [PATCH] Potentially fixes #1769 --- .../plotsquared/sponge/util/SpongeChunkManager.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Sponge/src/main/java/com/plotsquared/sponge/util/SpongeChunkManager.java b/Sponge/src/main/java/com/plotsquared/sponge/util/SpongeChunkManager.java index cc76508ac..dd49655eb 100644 --- a/Sponge/src/main/java/com/plotsquared/sponge/util/SpongeChunkManager.java +++ b/Sponge/src/main/java/com/plotsquared/sponge/util/SpongeChunkManager.java @@ -5,17 +5,17 @@ import com.intellectualcrafters.plot.object.Location; import com.intellectualcrafters.plot.object.Plot; import com.intellectualcrafters.plot.util.ChunkManager; import com.intellectualcrafters.plot.util.TaskManager; +import java.util.Optional; +import java.util.Set; +import java.util.function.Predicate; import org.spongepowered.api.entity.Entity; import org.spongepowered.api.entity.living.Living; import org.spongepowered.api.entity.living.animal.Animal; import org.spongepowered.api.entity.living.monster.Monster; +import org.spongepowered.api.entity.living.player.Player; import org.spongepowered.api.world.Chunk; import org.spongepowered.api.world.World; -import java.util.Optional; -import java.util.Set; -import java.util.function.Predicate; - public class SpongeChunkManager extends ChunkManager { @Override @@ -88,7 +88,9 @@ public class SpongeChunkManager extends ChunkManager { if ((x >= bx) && (x <= tx)) { int z = loc.getBlockZ(); if ((z >= bz) && (z <= tz)) { - entity.remove(); + if (!(entity instanceof Player)) { + entity.remove(); + } } } return false;