Class PlayerChatEvent
java.lang.Object
com.velocitypowered.api.event.player.PlayerChatEvent
- All Implemented Interfaces:
ResultedEvent<PlayerChatEvent.ChatResult>
@AwaitingEvent
public final class PlayerChatEvent
extends Object
implements ResultedEvent<PlayerChatEvent.ChatResult>
This event is fired when a player types in a chat message. Velocity will wait on this event
to finish firing before forwarding it to the server, if the result allows it.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classRepresents the result of thePlayerChatEvent.Nested classes/interfaces inherited from interface com.velocitypowered.api.event.ResultedEvent
ResultedEvent.ComponentResult, ResultedEvent.GenericResult, ResultedEvent.Result -
Constructor Summary
ConstructorsConstructorDescriptionPlayerChatEvent(Player player, String message) Constructs a PlayerChatEvent. -
Method Summary
Modifier and TypeMethodDescriptionReturns the result associated with this event.voidsetResult(PlayerChatEvent.ChatResult result) Sets the result of this event.toString()
-
Constructor Details
-
PlayerChatEvent
Constructs a PlayerChatEvent.- Parameters:
player- the player sending the messagemessage- the message being sent
-
-
Method Details
-
getPlayer
-
getMessage
-
getResult
Description copied from interface:ResultedEventReturns the result associated with this event.- Specified by:
getResultin interfaceResultedEvent<PlayerChatEvent.ChatResult>- Returns:
- the result of this event
-
setResult
Description copied from interface:ResultedEventSets the result of this event. The result must be non-null.- Specified by:
setResultin interfaceResultedEvent<PlayerChatEvent.ChatResult>- Parameters:
result- the new result
-
toString
-