mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-11-20 02:45:00 +00:00
Updated to new SpoutAPI version.
This commit is contained in:
parent
255b04e13d
commit
b8e9f6bb77
@ -27,6 +27,8 @@ import com.sk89q.worldedit.Vector;
|
||||
import com.sk89q.worldedit.WorldVector;
|
||||
import com.sk89q.worldedit.bags.BlockBag;
|
||||
import com.sk89q.worldedit.cui.CUIEvent;
|
||||
|
||||
import org.spout.api.entity.Entity;
|
||||
import org.spout.api.geo.discrete.Point;
|
||||
import org.spout.api.inventory.ItemStack;
|
||||
import org.spout.api.material.MaterialData;
|
||||
@ -56,7 +58,7 @@ public class SpoutPlayer extends LocalPlayer {
|
||||
|
||||
@Override
|
||||
public WorldVector getPosition() {
|
||||
Point loc = player.getEntity().getPoint();
|
||||
Point loc = player.getEntity().getPosition();
|
||||
return new WorldVector(SpoutUtil.getLocalWorld(loc.getWorld()),
|
||||
loc.getX(), loc.getY(), loc.getZ());
|
||||
}
|
||||
@ -106,9 +108,10 @@ public class SpoutPlayer extends LocalPlayer {
|
||||
|
||||
@Override
|
||||
public void setPosition(Vector pos, float pitch, float yaw) {
|
||||
player.getEntity().setPoint((float)pos.getX(), (float)pos.getY(), (float)pos.getZ());
|
||||
player.getEntity().setPitch(pitch);
|
||||
player.getEntity().setYaw(yaw);
|
||||
final Entity entity = player.getEntity();
|
||||
entity.setPosition(SpoutUtil.toPoint(entity.getWorld(), pos));
|
||||
entity.setPitch(pitch);
|
||||
entity.setYaw(yaw);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -128,7 +131,7 @@ public class SpoutPlayer extends LocalPlayer {
|
||||
|
||||
@Override
|
||||
public LocalWorld getWorld() {
|
||||
return SpoutUtil.getLocalWorld(player.getEntity().getPoint().getWorld());
|
||||
return SpoutUtil.getLocalWorld(player.getEntity().getWorld());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -311,7 +311,7 @@ public class WorldEditPlugin extends CommonPlugin implements Named {
|
||||
}
|
||||
|
||||
LocalSession session = controller.getSession(wrapPlayer(player));
|
||||
RegionSelector selector = session.getRegionSelector(SpoutUtil.getLocalWorld(player.getEntity().getPoint().getWorld()));
|
||||
RegionSelector selector = session.getRegionSelector(SpoutUtil.getLocalWorld(player.getEntity().getWorld()));
|
||||
|
||||
try {
|
||||
Region region = selector.getRegion();
|
||||
@ -348,7 +348,7 @@ public class WorldEditPlugin extends CommonPlugin implements Named {
|
||||
|
||||
LocalSession session = controller.getSession(wrapPlayer(player));
|
||||
RegionSelector sel = selection.getRegionSelector();
|
||||
session.setRegionSelector(SpoutUtil.getLocalWorld(player.getEntity().getPoint().getWorld()), sel);
|
||||
session.setRegionSelector(SpoutUtil.getLocalWorld(player.getEntity().getWorld()), sel);
|
||||
session.dispatchCUISelection(wrapPlayer(player));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user