Refactor Player::GetPos() -> Player::GetPosition()

This commit is contained in:
Melledy
2022-07-19 00:35:54 -07:00
parent 2e19e70fe1
commit cc5b292bc3
13 changed files with 32 additions and 32 deletions

View File

@@ -14,7 +14,7 @@ public final class PositionCommand implements CommandHandler {
@Override
public void execute(Player sender, Player targetPlayer, List<String> args) {
Position pos = targetPlayer.getPos();
Position pos = targetPlayer.getPosition();
CommandHandler.sendMessage(sender, translate(sender, "commands.position.success",
Float.toString(pos.getX()), Float.toString(pos.getY()), Float.toString(pos.getZ()),
Integer.toString(targetPlayer.getSceneId())));

View File

@@ -85,7 +85,7 @@ public final class SpawnCommand implements CommandHandler {
double maxRadius = Math.sqrt(amount * 0.2 / Math.PI);
for (int i = 0; i < amount; i++) {
Position pos = GetRandomPositionInCircle(targetPlayer.getPos(), maxRadius).addY(3);
Position pos = GetRandomPositionInCircle(targetPlayer.getPosition(), maxRadius).addY(3);
if(x != 0 && y != 0 && z != 0) {
pos = GetRandomPositionInCircle(new Position(x, y, z), maxRadius).addY(3);
}

View File

@@ -23,7 +23,7 @@ public final class TeleportAllCommand implements CommandHandler {
for (Player player : targetPlayer.getWorld().getPlayers()) {
if (player.equals(targetPlayer))
continue;
Position pos = targetPlayer.getPos();
Position pos = targetPlayer.getPosition();
player.getWorld().transferPlayerToScene(player, targetPlayer.getSceneId(), pos);
}

View File

@@ -26,7 +26,7 @@ public final class TeleportCommand implements CommandHandler {
@Override
public void execute(Player sender, Player targetPlayer, List<String> args) {
Position pos = targetPlayer.getPos();
Position pos = targetPlayer.getPosition();
float x = pos.getX();
float y = pos.getY();
float z = pos.getZ();