Class BoostBar
java.lang.Object
nl.minetopiasdb.api.boosters.objects.BoostBar
Management class for the booster bar
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addPlayerToBar
(org.bukkit.entity.Player player) Show bossbar to playervoid
Create the bossbar for all the online playersorg.bukkit.boss.BossBar
getBar
(org.bukkit.entity.Player player, ActiveBoost lastActivated) Get the bossbar for the provided boost percentagevoid
Reload the content of the bossbarvoid
Method called on server shutdown to remove the bossbarvoid
setBarLeft
(double part) Change the progress of the bossbar
-
Constructor Details
-
BoostBar
-
-
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
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)
-