mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-17 01:15:52 +01:00
Refactor Player::GetPos() -> Player::GetPosition()
This commit is contained in:
@@ -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())));
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user