mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-16 03:14:04 +00:00
commanding-pipeline diff
This commit is contained in:
@@ -20,6 +20,8 @@
|
||||
package com.sk89q.worldedit.extension.platform;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
|
||||
import com.boydti.fawe.wrappers.PlayerWrapper;
|
||||
import com.sk89q.worldedit.WorldEditException;
|
||||
import com.sk89q.worldedit.blocks.BaseItemStack;
|
||||
import com.sk89q.worldedit.entity.BaseEntity;
|
||||
@@ -48,6 +50,10 @@ public class PlayerProxy extends AbstractPlayerActor {
|
||||
private final World world;
|
||||
private Vector3 offset = Vector3.ZERO;
|
||||
|
||||
public PlayerProxy(Player player) {
|
||||
this(player, player, player, player.getWorld());
|
||||
}
|
||||
|
||||
public PlayerProxy(Player basePlayer, Actor permActor, Actor cuiActor, World world) {
|
||||
checkNotNull(basePlayer);
|
||||
checkNotNull(permActor);
|
||||
@@ -59,6 +65,13 @@ public class PlayerProxy extends AbstractPlayerActor {
|
||||
this.world = world;
|
||||
}
|
||||
|
||||
public static Player unwrap(Player player) {
|
||||
if (player instanceof PlayerProxy) {
|
||||
return unwrap(((PlayerProxy) player).getBasePlayer());
|
||||
}
|
||||
return player;
|
||||
}
|
||||
|
||||
public void setOffset(Vector3 position) {
|
||||
this.offset = position;
|
||||
}
|
||||
@@ -121,7 +134,7 @@ public class PlayerProxy extends AbstractPlayerActor {
|
||||
|
||||
@Override
|
||||
public World getWorld() {
|
||||
return world;
|
||||
return world == null ? basePlayer.getWorld() : world;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user