Class BossBarHandler
java.lang.Object
me.fami6xx.rpuniverse.core.misc.basichandlers.BossBarHandler
The BossBarHandler is the main class for handling the boss bars.
It is responsible for adding, removing, and updating the boss bars.
The BossBarHandler is a singleton class, so only one instance of it should be created.
The BossBarHandler is also a listener for the PlayerJoinEvent and PlayerQuitEvent. This means that the BossBarHandler will also listen for these events and update the boss bars accordingly.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a player to the boss barvoidremovePlayer(org.bukkit.entity.Player player)Remove a player from the boss barvoidsetMessage(org.bukkit.entity.Player player, String message)Set the message of a player's boss barvoidupdateBossBar(org.bukkit.entity.Player player)Update the boss bar of a player
-
Constructor Details
-
BossBarHandler
public BossBarHandler()
-
-
Method Details
-
addPlayer
Add a player to the boss bar- Parameters:
player- The player to addmessage- The message to display on the boss bar
-
removePlayer
public void removePlayer(org.bukkit.entity.Player player)Remove a player from the boss bar- Parameters:
player- The player to remove
-
setMessage
Set the message of a player's boss bar- Parameters:
player- The player to set the message ofmessage- The message to set the boss bar to
-
updateBossBar
public void updateBossBar(org.bukkit.entity.Player player)Update the boss bar of a player- Parameters:
player- The player to update the boss bar of
-