BossBarBuilder

A builder class for creating BossBarHandle instances using a DSL.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
fun autoRefresh(plugin: Plugin, interval: Ticks = 20.ticks): BossBarBuilder

Enables automatic refreshing of the boss bar.

Link copied to clipboard
Link copied to clipboard

Builds and registers the BossBarHandle.

Link copied to clipboard
infix fun color(color: BossBar.Color): BossBarBuilder

Sets the color of the boss bar.

Link copied to clipboard
fun filter(condition: (Player) -> Boolean): BossBarBuilder

Sets a visibility condition for the boss bar.

Link copied to clipboard
infix fun flag(flag: BossBar.Flag): BossBarBuilder

Adds a flag to the boss bar.

Link copied to clipboard
infix fun flags(flags: List<BossBar.Flag>): BossBarBuilder

Adds multiple flags to the boss bar.

Link copied to clipboard
Link copied to clipboard
infix fun listener(listener: BossBar.Listener): BossBarBuilder

Adds a listener to the boss bar.

Link copied to clipboard
infix fun listeners(listeners: List<BossBar.Listener>): BossBarBuilder

Adds multiple listeners to the boss bar.

Link copied to clipboard
infix fun overlay(overlay: BossBar.Overlay): BossBarBuilder

Sets the overlay of the boss bar.

Link copied to clipboard
Link copied to clipboard
infix fun player(player: Player): BossBarBuilder

Adds a player to show the boss bar to.

Link copied to clipboard
infix fun players(players: Set<Player>): BossBarBuilder

Sets the initial set of players to show the boss bar to.

Link copied to clipboard
infix fun progress(progress: Float): BossBarBuilder

Sets a static progress for the boss bar (0.0 to 1.0).

infix fun progress(progress: () -> Float): BossBarBuilder

Sets a dynamic progress for the boss bar.

infix fun progress(progress: (Player) -> Float): BossBarBuilder

Sets a progress that can change based on the player.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
infix fun title(title: () -> Component): BossBarBuilder

Sets a dynamic title for the boss bar.

infix fun title(title: (Player) -> Component): BossBarBuilder

Sets a title that can change based on the player.

infix fun title(title: Component): BossBarBuilder

Sets a static title for the boss bar.

Link copied to clipboard
Link copied to clipboard