Class PlayerChatEvent

All Implemented Interfaces:
Cancellable

@Deprecated(since="1.3.1") public class PlayerChatEvent extends PlayerEvent implements Cancellable
Deprecated.
Listening to this event forces chat to wait for the main thread, delaying chat messages. It is recommended to use AsyncChatEvent instead, wherever possible.
Holds information for player chat and commands
Since:
1.0.0
  • Constructor Details

  • Method Details

    • getMessage

      @NotNull public @NotNull String getMessage()
      Deprecated.
      Gets the message that the player is attempting to send
      Returns:
      Message the player is attempting to send
      Since:
      1.0.0
    • setMessage

      public void setMessage(@NotNull @NotNull String message)
      Deprecated.
      Sets the message that the player will send
      Parameters:
      message - New message that the player will send
      Since:
      1.0.0
    • setPlayer

      public void setPlayer(@NotNull @NotNull Player player)
      Deprecated.
      Sets the player that this message will display as, or command will be executed as
      Parameters:
      player - New player which this event will execute as
      Since:
      1.0.0
    • getFormat

      @NotNull public @NotNull String getFormat()
      Deprecated.
      Gets the format to use to display this chat message
      Returns:
      String.Format compatible format string
      Since:
      1.0.0
    • setFormat

      public void setFormat(@NotNull @NotNull String format)
      Deprecated.
      Sets the format to use to display this chat message
      Parameters:
      format - String.Format compatible format string
      Since:
      1.0.0
    • getRecipients

      @NotNull public @NotNull Set<Player> getRecipients()
      Deprecated.
      Gets a set of recipients that this chat message will be displayed to
      Returns:
      All Players who will see this chat message
      Since:
      1.0.0
    • isCancelled

      public boolean isCancelled()
      Deprecated.
      Description copied from interface: Cancellable
      Gets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins
      Specified by:
      isCancelled in interface Cancellable
      Returns:
      true if this event is cancelled
      Since:
      1.0.0
    • setCancelled

      public void setCancelled(boolean cancel)
      Deprecated.
      Description copied from interface: Cancellable
      Sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.
      Specified by:
      setCancelled in interface Cancellable
      Parameters:
      cancel - true if you wish to cancel this event
      Since:
      1.0.0
    • getHandlers

      @NotNull public @NotNull HandlerList getHandlers()
      Deprecated.
      Specified by:
      getHandlers in class Event
      Since:
      1.1.0
    • getHandlerList

      @NotNull public static @NotNull HandlerList getHandlerList()
      Deprecated.
      Since:
      1.1.0