Interface PlayerChatEvent
-
- All Superinterfaces:
Event,ResultedEvent<ResultedEvent.GenericResult>
- All Known Implementing Classes:
PlayerChatEventImpl
public interface PlayerChatEvent extends ResultedEvent<ResultedEvent.GenericResult>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.velocitypowered.api.event.ResultedEvent
ResultedEvent.ComponentResult, ResultedEvent.GenericResult, ResultedEvent.Result
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringcurrentMessage()Returns the message currently being sent, which may be modified by plugins.StringoriginalMessage()Returns the message the player originally sent.Playerplayer()Returns the player sending the message.voidsetCurrentMessage(String currentMessage)Sets a new message to send, if the message is allowed to be sent.-
Methods inherited from interface com.velocitypowered.api.event.ResultedEvent
result, setResult
-
-
-
-
Method Detail
-
player
Player player()
Returns the player sending the message.- Returns:
- the player sending the message
-
originalMessage
String originalMessage()
Returns the message the player originally sent.- Returns:
- the message the player originally sent
-
currentMessage
String currentMessage()
Returns the message currently being sent, which may be modified by plugins.- Returns:
- the message currently being sent
-
setCurrentMessage
void setCurrentMessage(String currentMessage)
Sets a new message to send, if the message is allowed to be sent.- Parameters:
currentMessage- the message to send instead of the current (or original) message
-
-