Class BossBarHandler

java.lang.Object
me.fami6xx.rpuniverse.core.misc.basichandlers.BossBarHandler

public class BossBarHandler extends Object
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 Details

    • BossBarHandler

      public BossBarHandler()
  • Method Details

    • addPlayer

      public void addPlayer(org.bukkit.entity.Player player, String message)
      Add a player to the boss bar
      Parameters:
      player - The player to add
      message - 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

      public void setMessage(org.bukkit.entity.Player player, String message)
      Set the message of a player's boss bar
      Parameters:
      player - The player to set the message of
      message - 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