bbcdBossBar Object - Kirastur/BossbarCountdown GitHub Wiki
This is the object which handles a runtime Bossbar attached to a player.
Attention: Don't use the creator. Use BBCDAPI.addBbcdBossBar
instead to use the internal Scheduler (see BBCDAPI Object).
public String getName()
Get the Name of the template used for this Bossbar.
public BBCDTemplate getBbcdTemplate()
Get the templated the BossBar is derived from.
public Player getPlayer()
Get the player the Bossbar is attached to.
public double getProgress()
Get the current progress.
public void setProgress(double progress) throws BBCDException
Set the current progress. This can also be done if the Countdown is currently running. An exception is thrown if you try to set a new progres while the Countdown has already finished.
public void setInitialProgress() throws BBCDException
Set the current progress back to its initial value. An exception is thrown if you try to set a new progres while the Countdown has already finished.
public double getSpeed()
Get the current countdown-speed.
public void setSpeed(double speed)
Set a new countdown-speed.
public String getTitle()
Get the current title.
public void setTitle(String title)
Set a new title for the Bossbar.
public boolean isRunning()
Return true if the countdown is currently running, or false if the countdown is paused or the goal was already reached.
public boolean isFinished()
Return true if the Bossbar has finished. A finish can be the goal has been reached or the Bossbar was cancelled.
public void start() throws BBCDException
Unpause the Bossbar so that the countdown contiues running. An exception is thrown if the Countdown has already finished.
public void stop()
Pause the bossbar-countdown.
public void finish()
Cancel the bbcdBossBar.
public boolean isVisible()
Get the visible-state of the Bossbar.
public void setVisible(boolean newVisible)
Set the visible-state of the Bossbar.
public void handleTick() throws BBCDException
This function is normally called by the Scheduler. But you can call it on your own if you need some extra speed. But it is better to use setSpeed instead.