Potentially fixes #1769

This commit is contained in:
Jesse Boyd 2018-05-07 10:20:13 +10:00
parent ef54775ca7
commit 9a7ce84e1c
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F

View File

@ -5,17 +5,17 @@ import com.intellectualcrafters.plot.object.Location;
import com.intellectualcrafters.plot.object.Plot; import com.intellectualcrafters.plot.object.Plot;
import com.intellectualcrafters.plot.util.ChunkManager; import com.intellectualcrafters.plot.util.ChunkManager;
import com.intellectualcrafters.plot.util.TaskManager; 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.Entity;
import org.spongepowered.api.entity.living.Living; import org.spongepowered.api.entity.living.Living;
import org.spongepowered.api.entity.living.animal.Animal; import org.spongepowered.api.entity.living.animal.Animal;
import org.spongepowered.api.entity.living.monster.Monster; 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.Chunk;
import org.spongepowered.api.world.World; import org.spongepowered.api.world.World;
import java.util.Optional;
import java.util.Set;
import java.util.function.Predicate;
public class SpongeChunkManager extends ChunkManager { public class SpongeChunkManager extends ChunkManager {
@Override @Override
@ -88,7 +88,9 @@ public class SpongeChunkManager extends ChunkManager {
if ((x >= bx) && (x <= tx)) { if ((x >= bx) && (x <= tx)) {
int z = loc.getBlockZ(); int z = loc.getBlockZ();
if ((z >= bz) && (z <= tz)) { if ((z >= bz) && (z <= tz)) {
entity.remove(); if (!(entity instanceof Player)) {
entity.remove();
}
} }
} }
return false; return false;