mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-06-12 12:33:54 +00:00
Replace setPosition with trySetPosition (#1403)
Allows cancellation information to be fed back into the ascend/descend algorithms. (cherry picked from commit 71e104bcb187a5313e88dda5df79059c8ffbc1fe)
This commit is contained in:
@ -165,12 +165,12 @@ public class SpongePlayer extends AbstractPlayerActor {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPosition(Vector3 pos, float pitch, float yaw) {
|
||||
public boolean trySetPosition(Vector3 pos, float pitch, float yaw) {
|
||||
org.spongepowered.api.world.Location<World> loc = new org.spongepowered.api.world.Location<>(
|
||||
this.player.getWorld(), pos.getX(), pos.getY(), pos.getZ()
|
||||
this.player.getWorld(), pos.getX(), pos.getY(), pos.getZ()
|
||||
);
|
||||
|
||||
this.player.setLocationAndRotation(loc, new Vector3d(pitch, yaw, 0));
|
||||
return this.player.setLocationAndRotation(loc, new Vector3d(pitch, yaw, 0));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user