com.github.ucchyocean.lc.channel
クラス ChannelPlayer

java.lang.Object
  上位を拡張 com.github.ucchyocean.lc.channel.ChannelPlayer
すべての実装されたインタフェース:
Comparable<ChannelPlayer>
直系の既知のサブクラス:
ChannelPlayerBlock, ChannelPlayerConsole, ChannelPlayerName, ChannelPlayerUUID

public abstract class ChannelPlayer
extends Object
implements Comparable<ChannelPlayer>

プレイヤーの抽象クラス

作成者:
ucchy

コンストラクタの概要
ChannelPlayer()
           
 
メソッドの概要
 int compareTo(ChannelPlayer other)
          インスタンス同士の比較を行う。
abstract  boolean equals(org.bukkit.command.CommandSender sender)
          指定されたCommandSenderと同一かどうかを返す
 boolean equals(Object other)
          同一のオブジェクトかどうかを返す
static ChannelPlayer getChannelPlayer(org.bukkit.command.CommandSender sender)
          CommandSenderから、ChannelPlayerを作成して返す
static ChannelPlayer getChannelPlayer(String nameOrUuid)
          名前またはUUIDから、ChannelPlayerを作成して返す
abstract  String getDisplayName()
          プレイヤー表示名を返す
abstract  org.bukkit.Location getLocation()
          発言者が今いる位置を取得する
abstract  String getName()
          プレイヤー名を返す
abstract  org.bukkit.entity.Player getPlayer()
          BukkitのPlayerを取得する
abstract  String getPrefix()
          プレフィックスを返す
abstract  String getSuffix()
          サフィックスを返す
abstract  String getWorldName()
          発言者が今いるワールドのワールド名を取得する
abstract  boolean hasPermission(String node)
          指定されたパーミッションノードの権限を持っているかどうかを取得する
abstract  boolean isOnline()
          オンラインかどうか
abstract  boolean isPermissionSet(String node)
          指定されたパーミッションノードが定義されているかどうかを取得する
abstract  void sendMessage(String message)
          メッセージを送る
abstract  String toString()
          文字列表現を返す
 
クラス java.lang.Object から継承されたメソッド
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

コンストラクタの詳細

ChannelPlayer

public ChannelPlayer()
メソッドの詳細

isOnline

public abstract boolean isOnline()
オンラインかどうか

戻り値:
オンラインかどうか

getName

public abstract String getName()
プレイヤー名を返す

戻り値:
プレイヤー名

getDisplayName

public abstract String getDisplayName()
プレイヤー表示名を返す

戻り値:
プレイヤー表示名

getPrefix

public abstract String getPrefix()
プレフィックスを返す

戻り値:
プレフィックス

getSuffix

public abstract String getSuffix()
サフィックスを返す

戻り値:
サフィックス

sendMessage

public abstract void sendMessage(String message)
メッセージを送る

パラメータ:
message - 送るメッセージ

getPlayer

public abstract org.bukkit.entity.Player getPlayer()
BukkitのPlayerを取得する

戻り値:
Player

getWorldName

public abstract String getWorldName()
発言者が今いるワールドのワールド名を取得する

戻り値:
ワールド名

getLocation

public abstract org.bukkit.Location getLocation()
発言者が今いる位置を取得する

戻り値:
発言者の位置

hasPermission

public abstract boolean hasPermission(String node)
指定されたパーミッションノードの権限を持っているかどうかを取得する

パラメータ:
node - パーミッションノード
戻り値:
権限を持っているかどうか

isPermissionSet

public abstract boolean isPermissionSet(String node)
指定されたパーミッションノードが定義されているかどうかを取得する

パラメータ:
node - パーミッションノード
戻り値:
定義を持っているかどうか

equals

public abstract boolean equals(org.bukkit.command.CommandSender sender)
指定されたCommandSenderと同一かどうかを返す

パラメータ:
sender -
戻り値:
同一かどうか

toString

public abstract String toString()
文字列表現を返す

オーバーライド:
クラス Object 内の toString
戻り値:
名前管理なら名前、UUID管理なら "$" + UUID を返す

equals

public boolean equals(Object other)
同一のオブジェクトかどうかを返す

オーバーライド:
クラス Object 内の equals
パラメータ:
other - 他方のオブジェクト
戻り値:
同一かどうか

compareTo

public int compareTo(ChannelPlayer other)
インスタンス同士の比較を行う。このメソッドを実装しておくことで、 Java8でのHashMapのキー挿入における高速化が期待できる(らしい)。

定義:
インタフェース Comparable<ChannelPlayer> 内の compareTo
パラメータ:
other -
戻り値:
関連項目:
Comparable.compareTo(java.lang.Object)

getChannelPlayer

public static ChannelPlayer getChannelPlayer(String nameOrUuid)
名前またはUUIDから、ChannelPlayerを作成して返す

パラメータ:
nameOrUuid - 名前、または、"$" + UUID
戻り値:
ChannelPlayer

getChannelPlayer

public static ChannelPlayer getChannelPlayer(org.bukkit.command.CommandSender sender)
CommandSenderから、ChannelPlayerを作成して返す

パラメータ:
sender -
戻り値:
ChannelPlayer


Copyright © 2016. All rights reserved.