Class PlayerChatEvent.ChatResult
java.lang.Object
com.velocitypowered.api.event.player.PlayerChatEvent.ChatResult
- All Implemented Interfaces:
ResultedEvent.Result
- Enclosing class:
- PlayerChatEvent
Represents the result of the
PlayerChatEvent.-
Method Summary
Modifier and TypeMethodDescriptionstatic PlayerChatEvent.ChatResultallowed()Allows the message to be sent, without modification.static PlayerChatEvent.ChatResultdenied()Prevents the message from being sent.booleanReturns whether or not the event is allowed to proceed.static PlayerChatEvent.ChatResultAllows the message to be sent, but silently replaces it with another.toString()
-
Method Details
-
getMessage
-
isAllowed
public boolean isAllowed()Description copied from interface:ResultedEvent.ResultReturns whether or not the event is allowed to proceed. Plugins may choose to skip denied events, and the proxy will respect the result of this method.- Specified by:
isAllowedin interfaceResultedEvent.Result- Returns:
- whether or not the event is allowed to proceed
-
toString
-
allowed
Allows the message to be sent, without modification.- Returns:
- the allowed result
-
denied
Prevents the message from being sent.- Returns:
- the denied result
-
message
Allows the message to be sent, but silently replaces it with another.- Parameters:
message- the message to use instead- Returns:
- a result with a new message
-