Implement missing OfflinePlayer location methods

This commit is contained in:
md678685 2019-04-07 17:06:17 +01:00
parent 7b165c6c2c
commit 3d97e93831
1 changed files with 9 additions and 0 deletions

View File

@ -133,15 +133,24 @@ public class OfflinePlayer implements Player {
return world;
}
@Override
public void setRotation(float yaw, float pitch) {
location.setYaw(yaw);
location.setPitch(pitch);
}
public void setLocation(Location loc) {
location = loc;
world = loc.getWorld();
}
public void teleportTo(Location lctn) {
location = lctn;
world = location.getWorld();
}
public void teleportTo(Entity entity) {
teleportTo(entity.getLocation());
}
@Override