本文整理汇总了Java中org.bukkit.entity.Player.willBeOnline方法的典型用法代码示例。如果您正苦于以下问题:Java Player.willBeOnline方法的具体用法?Java Player.willBeOnline怎么用?Java Player.willBeOnline使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.bukkit.entity.Player
的用法示例。
在下文中一共展示了Player.willBeOnline方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: applyNickname
import org.bukkit.entity.Player; //导入方法依赖的package包/类
protected void applyNickname(Player player, @Nullable String oldNickname, @Nullable String newNickname) {
validateNickname(newNickname);
if(oldNickname != null) {
nicknames.remove(oldNickname);
}
final Identity identity = createIdentity(userStore.getUser(player), newNickname);
if(player.willBeOnline()) {
identities.put(player, identity);
if(newNickname != null) {
nicknames.put(newNickname, player);
}
}
}
示例2: currentIdentity
import org.bukkit.entity.Player; //导入方法依赖的package包/类
private Identity currentIdentity(PlayerId playerId, @Nullable Player player) {
Identity identity = identities.get(player);
if(identity == null) {
identity = createIdentity(playerId, null);
if(player != null && player.willBeOnline()) {
identities.put(player, identity);
}
}
return identity;
}
示例3: isValid
import org.bukkit.entity.Player; //导入方法依赖的package包/类
@Override
public boolean isValid(Player key) {
return key.willBeOnline();
}
示例4: getPlayerEntry
import org.bukkit.entity.Player; //导入方法依赖的package包/类
public TabEntry getPlayerEntry(Player player) {
if(!player.willBeOnline()) {
throw new IllegalStateException("Tried to get TabEntry for disconnecting player");
}
return this.playerEntries.get(player);
}