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.ChatResult
allowed()
Allows the message to be sent, without modification.static PlayerChatEvent.ChatResult
denied()
Prevents the message from being sent.boolean
Returns whether or not the event is allowed to proceed.static PlayerChatEvent.ChatResult
Allows the message to be sent, but silently replaces it with another.toString()
-
Method Details
-
getMessage
-
isAllowed
public boolean isAllowed()Description copied from interface:ResultedEvent.Result
Returns 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:
isAllowed
in 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
-