feat(ball-bukkit): 添加精确ID获取玩家信息的功能

This commit is contained in:
2023-07-06 00:44:18 +08:00
parent f0cd59fc29
commit c47e162b32
2 changed files with 16 additions and 1 deletions

View File

@@ -762,6 +762,21 @@ public abstract class BallAPI {
return null;
}
/**
* 获取玩家信息
*
* @param playerName 玩家名称
* @return 玩家信息
*/
public BallPlayerInfo getPlayerInfoExact(@NotNull String playerName) {
for (BallPlayerInfo info : playerInfo.values()) {
if (info.getName().equals(playerName)) {
return info;
}
}
return null;
}
/**
* 获取玩家的UUID
*