3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-11-10 05:20:04 +01:00

Updated for SpoutAPI entity changes

Dieser Commit ist enthalten in:
zml2008 2012-02-15 20:58:41 -08:00
Ursprung c6ce8541bc
Commit 22b4d0adfb
3 geänderte Dateien mit 11 neuen und 10 gelöschten Zeilen

Datei anzeigen

@ -59,19 +59,19 @@ public class SpoutPlayer extends LocalPlayer {
@Override
public WorldVector getPosition() {
Point loc = player.getEntity().getTransform().getPosition();
Point loc = player.getEntity().getPoint();
return new WorldVector(SpoutUtil.getLocalWorld(loc.getWorld()),
loc.getX(), loc.getY(), loc.getZ());
}
@Override
public double getPitch() {
return player.getEntity().getTransform().getRotation().getAxisAngles().getY();
return player.getEntity().getPitch();
}
@Override
public double getYaw() {
return player.getEntity().getTransform().getRotation().getAxisAngles().getZ();
return player.getEntity().getYaw();
}
@Override
@ -109,9 +109,9 @@ public class SpoutPlayer extends LocalPlayer {
@Override
public void setPosition(Vector pos, float pitch, float yaw) {
Transform t = player.getEntity().getTransform();
t.setPosition(new Point(t.getPosition().getWorld(), (float) pos.getX(), (float) pos.getY(), (float) pos.getZ()));
t.setRotation(new Quaternion(pitch, Vector3.UNIT_Z).rotate(yaw, Vector3.UNIT_Y));
player.getEntity().setPoint((float)pos.getX(), (float)pos.getY(), (float)pos.getZ());
player.getEntity().setPitch(pitch);
player.getEntity().setYaw(yaw);
}
@Override
@ -131,7 +131,7 @@ public class SpoutPlayer extends LocalPlayer {
@Override
public LocalWorld getWorld() {
return SpoutUtil.getLocalWorld(player.getEntity().getTransform().getPosition().getWorld());
return SpoutUtil.getLocalWorld(player.getEntity().getPoint().getWorld());
}
@Override

Datei anzeigen

@ -81,7 +81,8 @@ public class SpoutServerInterface extends ServerInterface {
public void onCommandRegistration(List<Command> commands) {
for (Command command : commands) {
Spout.getGame().getRootCommand().addSubCommand(plugin, command.aliases()[0])
.addAlias(command.aliases()).setRawExecutor(executor).closeSubCommand();
.addAlias(command.aliases()).setRawExecutor(executor).
setUsage(command.usage()).setHelp(command.desc()).closeSubCommand();
}
}
}

Datei anzeigen

@ -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().getTransform().getPosition().getWorld()));
RegionSelector selector = session.getRegionSelector(SpoutUtil.getLocalWorld(player.getEntity().getPoint().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().getTransform().getPosition().getWorld()), sel);
session.setRegionSelector(SpoutUtil.getLocalWorld(player.getEntity().getPoint().getWorld()), sel);
session.dispatchCUISelection(wrapPlayer(player));
}