Class BoostBar

java.lang.Object
nl.minetopiasdb.api.boosters.objects.BoostBar

public class BoostBar extends Object
Management class for the booster bar
  • Constructor Details

    • BoostBar

      public BoostBar(BoostType type)
  • Method Details

    • createBossBarForAll

      public void createBossBarForAll()
      Create the bossbar for all the online players
    • addPlayerToBar

      public void addPlayerToBar(org.bukkit.entity.Player player)
      Show bossbar to player
      Parameters:
      player - player
    • reloadBar

      public void reloadBar()
      Reload the content of the bossbar
    • removeBarOnShutdown

      public void removeBarOnShutdown()
      Method called on server shutdown to remove the bossbar
    • getBar

      public org.bukkit.boss.BossBar getBar(org.bukkit.entity.Player player, ActiveBoost lastActivated)
      Get the bossbar for the provided boost percentage
      Parameters:
      player - random player needed for getting message.
      lastActivated - last activated boost
      Returns:
      bossbar
    • setBarLeft

      public void setBarLeft(double part)
      Change the progress of the bossbar
      Parameters:
      part - bar progress (time in minutes left / 60)