Class TablistManager
java.lang.Object
com.storytimeproductions.stweaks.util.TablistManager
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 -
Method Summary
Modifier and TypeMethodDescriptionstatic 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.
-
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 updatedmultiplier
- 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 titleminutesRemaining
- the number of minutes left before the player is kicked
-