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
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
Text contained in this chat.int
hashCode()
boolean
Cancelled state.boolean
Checks whether this message is valid as a commandboolean
Checks whether this message is run on this proxy server.void
setCancelled
(boolean cancelled) Cancelled state.void
setMessage
(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:
isCancelled
in interfaceCancellable
- Returns:
- the cancelled state of this event
-
getMessage
Text contained in this chat. -
setCancelled
public void setCancelled(boolean cancelled) Cancelled state.- Specified by:
setCancelled
in interfaceCancellable
- Parameters:
cancelled
- the state to set
-
setMessage
Text contained in this chat. -
toString
- Overrides:
toString
in classTargetedEvent
-
equals
- Overrides:
equals
in classTargetedEvent
-
canEqual
- Overrides:
canEqual
in classTargetedEvent
-
hashCode
public int hashCode()- Overrides:
hashCode
in classTargetedEvent
-