Feat: added PlayerActor.getUserName

This commit is contained in:
Reider745
2025-01-06 16:15:56 +03:00
parent b758ef0052
commit 8eca5dc721
2 changed files with 13 additions and 0 deletions
@@ -379,4 +379,12 @@ public class PlayerActorMethods {
}
return player.getAdventureSettings().get(Type.FLYING);
}
public static String getUserName(Player player) {
if (!isValid(player, false)) {
return null;
}
return player.getUsername();
}
}
@@ -183,4 +183,9 @@ public class NativePlayer {
public boolean isFlying() {
return PlayerActorMethods.isFlying(player);
}
@ZoteOnly
public String getUserName() {
return PlayerActorMethods.getUserName(player);
}
}