geforkt von Mirrors/FastAsyncWorldEdit
Check type, not state
Dieser Commit ist enthalten in:
Ursprung
eadf5ad246
Commit
a4f63ec6f0
@ -54,6 +54,7 @@ import com.sk89q.worldedit.math.BlockVector3;
|
|||||||
import com.sk89q.worldedit.math.transform.Identity;
|
import com.sk89q.worldedit.math.transform.Identity;
|
||||||
import com.sk89q.worldedit.math.transform.Transform;
|
import com.sk89q.worldedit.math.transform.Transform;
|
||||||
import com.sk89q.worldedit.regions.Region;
|
import com.sk89q.worldedit.regions.Region;
|
||||||
|
import com.sk89q.worldedit.world.entity.EntityType;
|
||||||
import com.sk89q.worldedit.world.entity.EntityTypes;
|
import com.sk89q.worldedit.world.entity.EntityTypes;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
@ -360,13 +361,7 @@ public class ForwardExtentCopy implements Operation {
|
|||||||
// filter players since they can't be copied
|
// filter players since they can't be copied
|
||||||
entities = source.getEntities(region)
|
entities = source.getEntities(region)
|
||||||
.stream()
|
.stream()
|
||||||
.filter(new Predicate<Entity>() {
|
.filter(e -> e.getType() != EntityTypes.PLAYER)
|
||||||
@Override
|
|
||||||
public boolean apply(@Nullable Entity input) {
|
|
||||||
BaseEntity state = input.getState();
|
|
||||||
return state != null && state.getType() != EntityTypes.PLAYER;
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
} else {
|
} else {
|
||||||
entities = new ArrayList<>();
|
entities = new ArrayList<>();
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren