From 271b45f3bac7b0a659066d7136ece471954c02e9 Mon Sep 17 00:00:00 2001 From: IronApollo Date: Thu, 17 Jan 2019 05:23:47 -0500 Subject: [PATCH] Final changes for the Vector update (probable fix for the "copying player entity" bug) --- .../boydti/fawe/bukkit/adapter/v1_13_1/Spigot_v1_13_R2.java | 3 ++- .../com/sk89q/worldedit/function/entity/ExtentEntityCopy.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/adapter/v1_13_1/Spigot_v1_13_R2.java b/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/adapter/v1_13_1/Spigot_v1_13_R2.java index 98076d018..2c0e3f18d 100644 --- a/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/adapter/v1_13_1/Spigot_v1_13_R2.java +++ b/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/adapter/v1_13_1/Spigot_v1_13_R2.java @@ -52,6 +52,7 @@ import org.bukkit.craftbukkit.v1_13_R2.CraftWorld; import org.bukkit.craftbukkit.v1_13_R2.block.CraftBlock; import org.bukkit.craftbukkit.v1_13_R2.block.data.CraftBlockData; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftEntity; +import org.bukkit.entity.EntityType; import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason; import javax.annotation.Nullable; @@ -328,7 +329,7 @@ public final class Spigot_v1_13_R2 extends CachedBukkitAdapter implements Bukkit public org.bukkit.entity.Entity createEntity(Location location, BaseEntity state) { checkNotNull(location); checkNotNull(state); - + if (state.getType() == com.sk89q.worldedit.world.entity.EntityTypes.PLAYER) return null; CraftWorld craftWorld = ((CraftWorld) location.getWorld()); WorldServer worldServer = craftWorld.getHandle(); diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/function/entity/ExtentEntityCopy.java b/worldedit-core/src/main/java/com/sk89q/worldedit/function/entity/ExtentEntityCopy.java index fd50dfd52..bf06d0a03 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/function/entity/ExtentEntityCopy.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/function/entity/ExtentEntityCopy.java @@ -38,6 +38,7 @@ import com.sk89q.worldedit.math.Vector3; import com.sk89q.worldedit.math.transform.Transform; import com.sk89q.worldedit.util.Direction; import com.sk89q.worldedit.util.Direction.Flag; +import com.sk89q.worldedit.world.entity.EntityTypes; import com.sk89q.worldedit.util.Location; import java.util.Arrays; import java.util.Map; @@ -97,7 +98,7 @@ public class ExtentEntityCopy implements EntityFunction { @Override public boolean apply(Entity entity) throws WorldEditException { BaseEntity state = entity.getState(); - if (state != null) { + if (state != null && state.getType() != EntityTypes.PLAYER) { Location newLocation; Location location = entity.getLocation();