Package net.md_5.bungee.api.event
Class ChatEvent
java.lang.Object
net.md_5.bungee.api.plugin.Event
net.md_5.bungee.api.event.TargetedEvent
net.md_5.bungee.api.event.ChatEvent
- All Implemented Interfaces:
Cancellable
Event called when a player sends a message to a server.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanText contained in this chat.inthashCode()booleanCancelled state.booleanChecks whether this message is valid as a commandbooleanChecks whether this message is run on this proxy server.voidsetCancelled(boolean cancelled) Cancelled state.voidsetMessage(String message) Text contained in this chat.toString()Methods inherited from class net.md_5.bungee.api.event.TargetedEvent
getReceiver, getSender
-
Constructor Details
-
ChatEvent
-
-
Method Details
-
isCommand
public boolean isCommand()Checks whether this message is valid as a command- Returns:
- if this message is a command
-
isProxyCommand
public boolean isProxyCommand()Checks whether this message is run on this proxy server.- Returns:
- if this command runs on the proxy
- See Also:
-
isCancelled
public boolean isCancelled()Cancelled state.- Specified by:
isCancelledin interfaceCancellable- Returns:
- the cancelled state of this event
-
getMessage
Text contained in this chat. -
setCancelled
public void setCancelled(boolean cancelled) Cancelled state.- Specified by:
setCancelledin interfaceCancellable- Parameters:
cancelled- the state to set
-
setMessage
Text contained in this chat. -
toString
- Overrides:
toStringin classTargetedEvent
-
equals
- Overrides:
equalsin classTargetedEvent
-
canEqual
- Overrides:
canEqualin classTargetedEvent
-
hashCode
public int hashCode()- Overrides:
hashCodein classTargetedEvent
-