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).
getName
public String getName()
Get the Name of the template used for this Bossbar.
getBbcdTemplate
public BBCDTemplate getBbcdTemplate()
Get the templated the BossBar is derived from.
getPlayer
public Player getPlayer()
Get the player the Bossbar is attached to.
getProgress
public double getProgress()
Get the current progress.
setProgress
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.
setInitialProgress
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.
getSpeed
public double getSpeed()
Get the current countdown-speed.
setSpeed
public void setSpeed(double speed)
Set a new countdown-speed.
getTitle
public String getTitle()
Get the current title.
setTitle
public void setTitle(String title)
Set a new title for the Bossbar.
isRunning
public boolean isRunning()
Return true if the countdown is currently running, or false if the countdown is paused or the goal was already reached.
isFinished
public boolean isFinished()
Return true if the Bossbar has finished. A finish can be the goal has been reached or the Bossbar was cancelled.
start
public void start() throws BBCDException
Unpause the Bossbar so that the countdown contiues running. An exception is thrown if the Countdown has already finished.
stop
public void stop()
Pause the bossbar-countdown.
finish
public void finish()
Cancel the bbcdBossBar.
isVisible
public boolean isVisible()
Get the visible-state of the Bossbar.
setVisible
public void setVisible(boolean newVisible)
Set the visible-state of the Bossbar.
handleTick
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.