geforkt von Mirrors/FastAsyncWorldEdit
Updated to new SpoutAPI version.
Dieser Commit ist enthalten in:
Ursprung
255b04e13d
Commit
b8e9f6bb77
@ -27,6 +27,8 @@ import com.sk89q.worldedit.Vector;
|
|||||||
import com.sk89q.worldedit.WorldVector;
|
import com.sk89q.worldedit.WorldVector;
|
||||||
import com.sk89q.worldedit.bags.BlockBag;
|
import com.sk89q.worldedit.bags.BlockBag;
|
||||||
import com.sk89q.worldedit.cui.CUIEvent;
|
import com.sk89q.worldedit.cui.CUIEvent;
|
||||||
|
|
||||||
|
import org.spout.api.entity.Entity;
|
||||||
import org.spout.api.geo.discrete.Point;
|
import org.spout.api.geo.discrete.Point;
|
||||||
import org.spout.api.inventory.ItemStack;
|
import org.spout.api.inventory.ItemStack;
|
||||||
import org.spout.api.material.MaterialData;
|
import org.spout.api.material.MaterialData;
|
||||||
@ -56,7 +58,7 @@ public class SpoutPlayer extends LocalPlayer {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public WorldVector getPosition() {
|
public WorldVector getPosition() {
|
||||||
Point loc = player.getEntity().getPoint();
|
Point loc = player.getEntity().getPosition();
|
||||||
return new WorldVector(SpoutUtil.getLocalWorld(loc.getWorld()),
|
return new WorldVector(SpoutUtil.getLocalWorld(loc.getWorld()),
|
||||||
loc.getX(), loc.getY(), loc.getZ());
|
loc.getX(), loc.getY(), loc.getZ());
|
||||||
}
|
}
|
||||||
@ -106,9 +108,10 @@ public class SpoutPlayer extends LocalPlayer {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setPosition(Vector pos, float pitch, float yaw) {
|
public void setPosition(Vector pos, float pitch, float yaw) {
|
||||||
player.getEntity().setPoint((float)pos.getX(), (float)pos.getY(), (float)pos.getZ());
|
final Entity entity = player.getEntity();
|
||||||
player.getEntity().setPitch(pitch);
|
entity.setPosition(SpoutUtil.toPoint(entity.getWorld(), pos));
|
||||||
player.getEntity().setYaw(yaw);
|
entity.setPitch(pitch);
|
||||||
|
entity.setYaw(yaw);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -128,7 +131,7 @@ public class SpoutPlayer extends LocalPlayer {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public LocalWorld getWorld() {
|
public LocalWorld getWorld() {
|
||||||
return SpoutUtil.getLocalWorld(player.getEntity().getPoint().getWorld());
|
return SpoutUtil.getLocalWorld(player.getEntity().getWorld());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -311,7 +311,7 @@ public class WorldEditPlugin extends CommonPlugin implements Named {
|
|||||||
}
|
}
|
||||||
|
|
||||||
LocalSession session = controller.getSession(wrapPlayer(player));
|
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 {
|
try {
|
||||||
Region region = selector.getRegion();
|
Region region = selector.getRegion();
|
||||||
@ -348,7 +348,7 @@ public class WorldEditPlugin extends CommonPlugin implements Named {
|
|||||||
|
|
||||||
LocalSession session = controller.getSession(wrapPlayer(player));
|
LocalSession session = controller.getSession(wrapPlayer(player));
|
||||||
RegionSelector sel = selection.getRegionSelector();
|
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));
|
session.dispatchCUISelection(wrapPlayer(player));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren