AsyncPlayerChatEvent
.
Listening to this event forces chat to wait for the main thread which
causes delays for chat. AsyncPlayerChatEvent
is the encouraged
alternative for thread safe implementations.
@Deprecated public class PlayerChatEvent extends PlayerEvent implements Cancellable
Event.Result
player
コンストラクタと説明 |
---|
PlayerChatEvent(Player player,
String message)
非推奨です。
|
PlayerChatEvent(Player player,
String message,
String format,
Set<Player> recipients)
非推奨です。
|
修飾子とタイプ | メソッドと説明 |
---|---|
String |
getFormat()
非推奨です。
Gets the format to use to display this chat message
|
static HandlerList |
getHandlerList()
非推奨です。
|
HandlerList |
getHandlers()
非推奨です。
|
String |
getMessage()
非推奨です。
Gets the message that the player is attempting to send
|
Set<Player> |
getRecipients()
非推奨です。
Gets a set of recipients that this chat message will be displayed to
|
boolean |
isCancelled()
非推奨です。
Gets the cancellation state of this event.
|
void |
setCancelled(boolean cancel)
非推奨です。
Sets the cancellation state of this event.
|
void |
setFormat(String format)
非推奨です。
Sets the format to use to display this chat message
|
void |
setMessage(String message)
非推奨です。
Sets the message that the player will send
|
void |
setPlayer(Player player)
非推奨です。
Sets the player that this message will display as, or command will be
executed as
|
getPlayer
getEventName, isAsynchronous
public boolean isCancelled()
Cancellable
isCancelled
インタフェース内 Cancellable
public void setCancelled(boolean cancel)
Cancellable
setCancelled
インタフェース内 Cancellable
cancel
- true if you wish to cancel this eventpublic String getMessage()
public void setMessage(String message)
message
- New message that the player will sendpublic void setPlayer(Player player)
player
- New player which this event will execute aspublic String getFormat()
public void setFormat(String format)
format
- String.Format compatible format stringpublic Set<Player> getRecipients()
public HandlerList getHandlers()
getHandlers
クラス内 Event
public static HandlerList getHandlerList()
Copyright © 2016. All rights reserved.