Class HoverInfoManager

java.lang.Object
me.remigio07.chatplugin.api.server.chat.HoverInfoManager
All Implemented Interfaces:
ChatPluginManager

public abstract class HoverInfoManager extends Object implements ChatPluginManager
Manager that handles hover info in the chat.
See Also:
  • Constructor Details

    • HoverInfoManager

      public HoverInfoManager()
  • Method Details

    • isEnabled

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

      Found at: "chat.hover-info.enabled" in ConfigurationType.CHAT

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

      public boolean isRankHoverEnabled()
      Checks if info should be displayed when hovering over a player's rank in the chat.

      Found at: "chat.hover-info.rank.enabled" in ConfigurationType.CHAT

      Returns:
      Whether rank hover should be displayed
    • isPlayerHoverEnabled

      public boolean isPlayerHoverEnabled()
      Checks if info should be displayed when hovering over a player's name in the chat.

      Found at: "chat.hover-info.player.enabled" in ConfigurationType.CHAT

      Returns:
      Whether player hover should be displayed
    • isURLHoverEnabled

      public boolean isURLHoverEnabled()
      Checks if text should be displayed when hovering over a URL in the chat.

      Found at: "chat.hover-info.url.enabled" in ConfigurationType.CHAT

      Returns:
      Whether URL hover should be displayed
    • isDefaultHTTPS

      public boolean isDefaultHTTPS()
      Checks if "https://" should be automatically applied to URLs sent in the chat.

      Found at: "chat.hover-info.url.default-https" in ConfigurationType.CHAT

      Returns:
      Whether "https://" should be added to URLs
    • getPlayerClickAction

      public ClickActionAdapter getPlayerClickAction()
      Gets the click action executed when a player clicks a player's name in the chat.

      Found at: "chat.hover-info.player.click.action" in ConfigurationType.CHAT

      Returns:
      Action executed when clicking players' names
    • getPlayerClickValue

      public String getPlayerClickValue()
      Gets the value applied to getPlayerClickAction() when a player clicks a player's name in the chat.

      Found at: "chat.hover-info.player.click.value" in ConfigurationType.CHAT

      Returns:
      Value associated with the action executed on click
    • getURLColor

      public String getURLColor()
      Gets the color that will be applied to valid URLs sent in the chat.

      Found at: "chat.hover-info.player.color" in ConfigurationType.CHAT

      Returns:
      URLs' color
    • getPlayerPlaceholderTypes

      public List<PlaceholderType> getPlayerPlaceholderTypes()
      Gets the list of placeholder types used to translate players' hovers sent in the chat.

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

      Returns:
      Placeholders used to translate hovers
    • getPlayerHovers

      public Map<Language,String> getPlayerHovers()
      Gets the map of the hovers displayed when hovering over a player's name in the chat.

      Found at: "chat.hover-info.player.hovers" in ConfigurationType.CHAT

      Returns:
      Player hovers
    • getURLHovers

      public Map<Language,String> getURLHovers()
      Gets the map of the hovers displayed when hovering over a URL in the chat.

      Found at: "chat.hover-info.url.hovers" in ConfigurationType.CHAT

      Returns:
      URL hovers
    • getChatFormat

      public List<String> getChatFormat()
      Gets ChatManager.getFormat() split around placeholders contained in the format.
      Returns:
      Chat's format, split up
    • getGlobalChatFormat

      public List<String> getGlobalChatFormat()
      Gets RangedChatManager.getGlobalModeFormat() split around placeholders contained in the format.

      Will always return an empty list when !RangedChatManager.isEnabled() || !RangedChatManager.isGlobalModeEnabled().

      Returns:
      Global chat's format, split up
    • getInstance

      public static HoverInfoManager getInstance()
      Gets this manager's instance.
      Returns:
      Manager's instance