Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-12-24 18:10:08 +01:00
Final changes for the Vector update (probable fix for the "copying player entity" bug)
Dieser Commit ist enthalten in:
Ursprung
cd1d45b856
Commit
271b45f3ba
@ -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.CraftBlock;
|
||||||
import org.bukkit.craftbukkit.v1_13_R2.block.data.CraftBlockData;
|
import org.bukkit.craftbukkit.v1_13_R2.block.data.CraftBlockData;
|
||||||
import org.bukkit.craftbukkit.v1_13_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_13_R2.entity.CraftEntity;
|
||||||
|
import org.bukkit.entity.EntityType;
|
||||||
import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason;
|
import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
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) {
|
public org.bukkit.entity.Entity createEntity(Location location, BaseEntity state) {
|
||||||
checkNotNull(location);
|
checkNotNull(location);
|
||||||
checkNotNull(state);
|
checkNotNull(state);
|
||||||
|
if (state.getType() == com.sk89q.worldedit.world.entity.EntityTypes.PLAYER) return null;
|
||||||
CraftWorld craftWorld = ((CraftWorld) location.getWorld());
|
CraftWorld craftWorld = ((CraftWorld) location.getWorld());
|
||||||
WorldServer worldServer = craftWorld.getHandle();
|
WorldServer worldServer = craftWorld.getHandle();
|
||||||
|
|
||||||
|
@ -38,6 +38,7 @@ import com.sk89q.worldedit.math.Vector3;
|
|||||||
import com.sk89q.worldedit.math.transform.Transform;
|
import com.sk89q.worldedit.math.transform.Transform;
|
||||||
import com.sk89q.worldedit.util.Direction;
|
import com.sk89q.worldedit.util.Direction;
|
||||||
import com.sk89q.worldedit.util.Direction.Flag;
|
import com.sk89q.worldedit.util.Direction.Flag;
|
||||||
|
import com.sk89q.worldedit.world.entity.EntityTypes;
|
||||||
import com.sk89q.worldedit.util.Location;
|
import com.sk89q.worldedit.util.Location;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@ -97,7 +98,7 @@ public class ExtentEntityCopy implements EntityFunction {
|
|||||||
@Override
|
@Override
|
||||||
public boolean apply(Entity entity) throws WorldEditException {
|
public boolean apply(Entity entity) throws WorldEditException {
|
||||||
BaseEntity state = entity.getState();
|
BaseEntity state = entity.getState();
|
||||||
if (state != null) {
|
if (state != null && state.getType() != EntityTypes.PLAYER) {
|
||||||
Location newLocation;
|
Location newLocation;
|
||||||
Location location = entity.getLocation();
|
Location location = entity.getLocation();
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren