java.lang.Object
org.bukkit.event.Event
net.sacredlabyrinth.phaed.simpleclans.events.ChatEvent
All Implemented Interfaces:
org.bukkit.event.Cancellable

public class ChatEvent extends org.bukkit.event.Event implements org.bukkit.event.Cancellable
Author:
RoinujNosde
  • Constructor Details

  • Method Details

    • isCancelled

      public boolean isCancelled()
      Specified by:
      isCancelled in interface org.bukkit.event.Cancellable
    • setCancelled

      public void setCancelled(boolean cancel)
      Specified by:
      setCancelled in interface org.bukkit.event.Cancellable
    • getType

      public ChatEvent.Type getType()
      Gets the chat type
      Returns:
      the chat type
    • getPlaceholders

      public Map<String,String> getPlaceholders()
      Gets the placeholders
      Returns:
      an unmodifiable map of the placeholders
    • addPlaceholder

      public void addPlaceholder(String placeholderName, String value)
      Adds a placeholder and its value to the chat message
      Parameters:
      placeholderName - the placeholder name
      value - the String to be replaced
      Throws:
      IllegalArgumentException - if one of the args are null; if one of the args are empty; if the placeholder name equals "clan", "nick-color", "player", "rank" or "message"
    • removePlaceholder

      public void removePlaceholder(String placeholderName)
      Removes a placeholder from the chat message
      Parameters:
      placeholderName - the placeholder name
    • getReceivers

      public List<ClanPlayer> getReceivers()
      Gets the message receivers
      Returns:
      the receivers
    • setMessage

      public void setMessage(String message)
      Changes the chat message
      Parameters:
      message - the new message
    • getMessage

      public String getMessage()
      Gets the message to be sent
      Returns:
      the message
    • getSender

      public ClanPlayer getSender()
      Gets the message sender
      Returns:
      the sender
    • getHandlers

      @NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()
      Specified by:
      getHandlers in class org.bukkit.event.Event
    • getHandlerList

      public static org.bukkit.event.HandlerList getHandlerList()