Class PlayerChatEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
org.bukkit.event.player.PlayerChatEvent
- All Implemented Interfaces:
Cancellable
Deprecated.
Holds information for player chat and commands
- Since:
- 1.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from class Event
Event.Result -
Field Summary
Fields inherited from class PlayerEvent
player -
Constructor Summary
ConstructorsConstructorDescriptionPlayerChatEvent(@NotNull Player player, @NotNull String message) Deprecated.PlayerChatEvent(@NotNull Player player, @NotNull String message, @NotNull String format, @NotNull Set<Player> recipients) Deprecated. -
Method Summary
Modifier and TypeMethodDescription@NotNull StringDeprecated.Gets the format to use to display this chat messagestatic @NotNull HandlerListDeprecated.@NotNull HandlerListDeprecated.@NotNull StringDeprecated.Gets the message that the player is attempting to sendDeprecated.Gets a set of recipients that this chat message will be displayed tobooleanDeprecated.Gets the cancellation state of this event.voidsetCancelled(boolean cancel) Deprecated.Sets the cancellation state of this event.voidDeprecated.Sets the format to use to display this chat messagevoidsetMessage(@NotNull String message) Deprecated.Sets the message that the player will sendvoidDeprecated.Sets the player that this message will display as, or command will be executed asMethods inherited from class PlayerEvent
getPlayerMethods inherited from class Event
callEvent, getEventName, isAsynchronous
-
Constructor Details
-
PlayerChatEvent
-
PlayerChatEvent
-
-
Method Details
-
getMessage
Deprecated.Gets the message that the player is attempting to send- Returns:
- Message the player is attempting to send
- Since:
- 1.0.0
-
setMessage
Deprecated.Sets the message that the player will send- Parameters:
message- New message that the player will send- Since:
- 1.0.0
-
setPlayer
Deprecated.Sets the player that this message will display as, or command will be executed as- Parameters:
player- New player which this event will execute as- Since:
- 1.0.0
-
getFormat
Deprecated.Gets the format to use to display this chat message- Returns:
- String.Format compatible format string
- Since:
- 1.0.0
-
setFormat
Deprecated.Sets the format to use to display this chat message- Parameters:
format- String.Format compatible format string- Since:
- 1.0.0
-
getRecipients
-
isCancelled
public boolean isCancelled()Deprecated.Description copied from interface:CancellableGets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins- Specified by:
isCancelledin interfaceCancellable- Returns:
trueif this event is cancelled- Since:
- 1.0.0
-
setCancelled
public void setCancelled(boolean cancel) Deprecated.Description copied from interface:CancellableSets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.- Specified by:
setCancelledin interfaceCancellable- Parameters:
cancel-trueif you wish to cancel this event- Since:
- 1.0.0
-
getHandlers
Deprecated.- Specified by:
getHandlersin classEvent- Since:
- 1.1.0
-
getHandlerList
-
AsyncChatEventinstead, wherever possible.