Class BossBarManager
java.lang.Object
com.storytimeproductions.stweaks.util.BossBarManager
Manages Boss Bars that show each player's remaining playtime progress.
The BossBar updates every second and visualizes the remaining playtime in a "xxmxxs" format, reflecting how close the player is to reaching the daily 60-minute playtime requirement.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
init
(org.bukkit.plugin.java.JavaPlugin pl) Initializes the BossBarManager and starts periodic updates for all online players.static void
removeBossBar
(org.bukkit.entity.Player player) Removes a player's boss bar (e.g., on logout).static void
updateBossBar
(org.bukkit.entity.Player player) Updates the Boss Bar for the given player to reflect their live playtime countdown.
-
Constructor Details
-
BossBarManager
public BossBarManager()
-
-
Method Details
-
init
public static void init(org.bukkit.plugin.java.JavaPlugin pl) Initializes the BossBarManager and starts periodic updates for all online players.- Parameters:
pl
- The plugin instance.
-
updateBossBar
public static void updateBossBar(org.bukkit.entity.Player player) Updates the Boss Bar for the given player to reflect their live playtime countdown.- Parameters:
player
- The player to update.
-
removeBossBar
public static void removeBossBar(org.bukkit.entity.Player player) Removes a player's boss bar (e.g., on logout).- Parameters:
player
- The player to remove the boss bar for.
-