java.lang.Object
java.util.TimerTask
me.remigio07.chatplugin.api.server.tablist.custom_suffix.CustomSuffixManager
All Implemented Interfaces:
Runnable, ChatPluginManager

public abstract class CustomSuffixManager extends TimerTask implements ChatPluginManager
Manager that handles custom suffixes in the Tablist.
See Also:
  • Constructor Details

    • CustomSuffixManager

      public CustomSuffixManager()
  • Method Details

    • isEnabled

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

      Found at: "tablists.settings.custom-suffix.enabled" in ConfigurationType.TABLISTS

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

      public ValueContainer<Integer> getDisplayedValue()
      Gets the displayed value of the custom suffix.

      Found at: "tablists.settings.custom-suffix.displayed-value" in ConfigurationType.TABLISTS

      Returns:
      Displayed value of the suffix
    • getRenderType

      public RenderType getRenderType()
      Gets the render type of the custom suffix.

      Found at: "tablists.settings.custom-suffix.render-type" in ConfigurationType.TABLISTS

      Returns:
      Render type of the suffix
    • getPlaceholderTypes

      public List<PlaceholderType> getPlaceholderTypes()
      Gets the list of placeholder types used to translate getDisplayedValue().

      Found at: "tablists.settings.custom-suffix.placeholder-types" in ConfigurationType.TABLISTS

      Returns:
      Placeholders used to translate displayed value
    • getInstance

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

      public abstract void run()
      Automatic custom suffixes updater, called once every TablistManager.getSendingTimeout() ms.
      Specified by:
      run in interface Runnable
      Specified by:
      run in class TimerTask
    • updateCustomSuffixes

      public abstract void updateCustomSuffixes(ChatPluginServerPlayer player)
      Updates custom suffixes to a player.
      Parameters:
      player - Player to update the suffixes for