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`

public class ChatEvent extends TargetedEvent implements Cancellable
Event called when a player sends a message to a server.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ChatEvent(Connection sender, Connection receiver, String message)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected boolean`
  `canEqual(Object other)`
  `boolean`
  `equals(Object o)`
  `String`
  `getMessage()`
  Text contained in this chat.
  `int`
  `hashCode()`
  `boolean`
  `isCancelled()`
  Cancelled state.
  `boolean`
  `isCommand()`
  Checks whether this message is valid as a command
  `boolean`
  `isProxyCommand()`
  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.
  `String`
  `toString()`

  ### Methods inherited from class net.md_5.bungee.api.event.TargetedEvent

  `getReceiver, getSender`

  ### Methods inherited from class net.md_5.bungee.api.plugin.Event

  `postCall`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### ChatEvent

    public ChatEvent(Connection sender, Connection receiver, String message)

- ## 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:
      - `PluginManager.isExecutableCommand(java.lang.String, net.md_5.bungee.api.CommandSender)`

  - ### isCancelled

    public boolean isCancelled()
    Cancelled state.
    Specified by:
      `isCancelled` in interface `Cancellable`
    Returns:
      the cancelled state of this event

  - ### getMessage

    public String getMessage()
    Text contained in this chat.

  - ### setCancelled

    public void setCancelled(boolean cancelled)
    Cancelled state.
    Specified by:
      `setCancelled` in interface `Cancellable`
    Parameters:
      `cancelled` - the state to set

  - ### setMessage

    public void setMessage(String message)
    Text contained in this chat.

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `TargetedEvent`

  - ### equals

    public boolean equals(Object o)
    Overrides:
      `equals` in class `TargetedEvent`

  - ### canEqual

    protected boolean canEqual(Object other)
    Overrides:
      `canEqual` in class `TargetedEvent`

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `TargetedEvent`