【发布时间】:2014-05-21 16:29:30
【问题描述】:
如何通过 UUID 获取离线玩家?我可以通过遍历所有在线玩家并在 UUID 匹配时返回通过 UUID 获取在线玩家,但我不知道如何为离线玩家执行此操作。
【问题讨论】:
-
你应该做一些研究,或者至少在你问这个问题之前尝试过
如何通过 UUID 获取离线玩家?我可以通过遍历所有在线玩家并在 UUID 匹配时返回通过 UUID 获取在线玩家,但我不知道如何为离线玩家执行此操作。
【问题讨论】:
CraftBukkit (1.7.9-R0.1) Beta build 在org.bukkit.Server 接口中有你需要的方法:
/**
* Gets the player by the given UUID, regardless if they are offline or
* online.
* <p>
* This will return an object even if the player does not exist. To this
* method, all players will exist.
*
* @param id the UUID of the player to retrieve
* @return an offline player
*/
public OfflinePlayer getOfflinePlayer(UUID id);
相关问题:BUKKIT-5501
相关提交:4bc86be4
【讨论】: