Class ChatManager

java.lang.Object
me.remigio07.chatplugin.api.server.chat.ChatManager
All Implemented Interfaces:
DenyChatReasonHandler, ChatPluginManager

public abstract class ChatManager extends Object implements DenyChatReasonHandler
Manager that handles the chat.
See Also:
  • Constructor Details

    • ChatManager

      public ChatManager()
  • Method Details

    • isEnabled

      public boolean isEnabled()
      Checks if this manager is enabled.

      Found at: "chat.enabled" in ConfigurationType.CHAT

      Specified by:
      isEnabled in interface ChatPluginManager
      Returns:
      Whether this manager is enabled
    • shouldOverrideChatEvent

      public boolean shouldOverrideChatEvent()
      Checks if the chat event should be overridden by ChatPlugin or if it should only change its format and let other plugins handle it.

      Found at: "chat.event.override" in ConfigurationType.CHAT

      Returns:
      Whether to override the chat event
    • isChatMuted

      public boolean isChatMuted()
      Checks if the chat is globally muted.
      Returns:
      Whether the chat is muted
    • getChatEventPriority

      public String getChatEventPriority()
      Gets the priority of ChatPlugin's chat event.

      This value depends on the implementation.

      Found at: "chat.event.priority" in ConfigurationType.CHAT

      Returns:
      Chat event's priority
    • getFormat

      public String getFormat()
      Gets the format used to send messages to players.

      Found at: "chat.format" in ConfigurationType.CHAT

      Returns:
      Chat's format
    • getRecognizedTLDs

      public List<String> getRecognizedTLDs()
      Gets the list of recognized TLDs in the chat.

      The returned list is used by the AntispamManager and the HoverInfoManager.

      Found at: "chat.recognized-tlds" in ConfigurationType.CHAT

      Returns:
      Recognized TLDs in the chat
    • getPlaceholderTypes

      public List<PlaceholderType> getPlaceholderTypes()
      Gets the list of placeholder types used to translate messages sent in the chat.

      Found at: "chat.placeholder-types" in ConfigurationType.CHAT

      Returns:
      Placeholders used to translate messages
    • getInstance

      public static ChatManager getInstance()
      Gets this manager's instance.
      Returns:
      Manager's instance
    • setChatMuted

      public abstract void setChatMuted(boolean chatMuted)
      Sets whether the chat should be globally muted.
      Parameters:
      chatMuted - Whether the chat should be muted
      See Also: