Implement missing OfflinePlayer location methods

This commit is contained in:
md678685 2019-04-07 17:06:17 +01:00
parent 7b165c6c2c
commit 3d97e93831

View file

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