本文整理匯總了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);
}