Cancellable
@Deprecated public class PlayerChatEvent extends PlayerEvent implements Cancellable
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.
Event.Result
player
Constructor | Description |
---|---|
PlayerChatEvent(Player player,
java.lang.String message) |
Deprecated.
|
PlayerChatEvent(Player player,
java.lang.String message,
java.lang.String format,
java.util.Set<Player> recipients) |
Deprecated.
|
Modifier and Type | Method | Description |
---|---|---|
java.lang.String |
getFormat() |
Deprecated.
Gets the format to use to display this chat message
|
static HandlerList |
getHandlerList() |
Deprecated.
|
HandlerList |
getHandlers() |
Deprecated.
|
java.lang.String |
getMessage() |
Deprecated.
Gets the message that the player is attempting to send
|
java.util.Set<Player> |
getRecipients() |
Deprecated.
Gets a set of recipients that this chat message will be displayed to
|
boolean |
isCancelled() |
Deprecated.
Gets the cancellation state of this event.
|
void |
setCancelled(boolean cancel) |
Deprecated.
Sets the cancellation state of this event.
|
void |
setFormat(java.lang.String format) |
Deprecated.
Sets the format to use to display this chat message
|
void |
setMessage(java.lang.String message) |
Deprecated.
Sets the message that the player will send
|
void |
setPlayer(Player player) |
Deprecated.
Sets the player that this message will display as, or command will be
executed as
|
getEventName, isAsynchronous
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getPlayer
public PlayerChatEvent(Player player, java.lang.String message)
public boolean isCancelled()
Cancellable
isCancelled
in interface Cancellable
public void setCancelled(boolean cancel)
Cancellable
setCancelled
in interface Cancellable
cancel
- true if you wish to cancel this eventpublic java.lang.String getMessage()
public void setMessage(java.lang.String message)
message
- New message that the player will sendpublic void setPlayer(Player player)
player
- New player which this event will execute aspublic java.lang.String getFormat()
public void setFormat(java.lang.String format)
format
- String.Format compatible format stringpublic java.util.Set<Player> getRecipients()
public HandlerList getHandlers()
getHandlers
in class Event
public static HandlerList getHandlerList()
Copyright © 2018. All rights reserved.