BBCDAPI Object - Kirastur/BossbarCountdown GitHub Wiki

This is the primary object of the API. You can get it using the BBCDProvider as described in the API topic.

findTemplate

public BBCDTemplate findTemplate(String templateName)

Find a template by its name. The templates are defined in the configuration. You need a template if you want to create a bbcdBossBar. If there is no template with the given name, null is returned.

getTemplates

public List<BBCDTemplate> getTemplates()

Get all templates as they are read from the configuration.

findBbcdBossBar

public BBCDBossBar findBbcdBossBar(Player player, BBCDTemplate bbcdTemplate)

Find the bbcdBossBar with the given template name which is associated with the given player. If the player has no bbcdBossBar of the given type, null is returned.

getBbcdBossBars

public Set<BBCDBossBar> getBbcdBossBars()

Get all currently active bbcdBossBars.

addBbcdBossBar

public BBCDBossBar addBbcdBossBar(Player player, BBCDTemplate bbcdTemplate)

Create a bbcdBossBar from the given template and attach it to the given player. If in the template Autostart is true, the countdown starts automatically. If Show is true, the Bossbar is visible. If the player has already a Bossbar of this type, the old Bossbar gets cancelled.

cancel

public void cancel(Player player)

Cancel all Bossbars for the given player. If you want to only cancel a specific Bossbar, you should use BBCDBossBar.finish().

reload

public void reload() throws BBCDException

Reloads the complete TemplateSet with all Templates from configuration. The old TemplateSet is thrown away if successfull.