Class TablistManager

java.lang.Object
com.storytimeproductions.stweaks.util.TablistManager

public class TablistManager extends Object
Utility class responsible for updating the tab list header and footer for players on the server. The header typically displays the server name, while the footer can be used to show dynamic information like the current multiplier or other server stats.

Uses the Adventure API for styled text formatting.

  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    sendPlaytimeWarningTitle(org.bukkit.entity.Player player, int minutesRemaining)
    Sends a warning title to the player when their playtime is about to end, based on the time remaining.
    static void
    updateTablist(org.bukkit.entity.Player player, double multiplier)
    Updates the tab list for the given player with a custom header and footer.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TablistManager

      public TablistManager()
  • Method Details

    • updateTablist

      public static void updateTablist(org.bukkit.entity.Player player, double multiplier)
      Updates the tab list for the given player with a custom header and footer.

      The header displays the server name with styling. The footer displays the current playtime multiplier, which may change depending on server events, days of the week, or other conditions.

      Parameters:
      player - the player whose tab list should be updated
      multiplier - the current playtime multiplier to display in the tab footer
    • sendPlaytimeWarningTitle

      public static void sendPlaytimeWarningTitle(org.bukkit.entity.Player player, int minutesRemaining)
      Sends a warning title to the player when their playtime is about to end, based on the time remaining. Different messages are displayed depending on whether the player has 10, 5, or 1 minute(s) remaining.
      Parameters:
      player - the player who will receive the warning title
      minutesRemaining - the number of minutes left before the player is kicked