SidebarBuilder

class SidebarBuilder(title: () -> Component)

A builder class for creating SidebarHandle instances using a DSL.

Parameters

title

A function providing the initial title of the sidebar.

Constructors

Link copied to clipboard
constructor(title: () -> Component)

Functions

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

Enables automatic refreshing of the sidebar.

Link copied to clipboard

Builds and registers the SidebarHandle.

Link copied to clipboard
infix fun line(line: () -> Component): SidebarBuilder

Adds a dynamic line to the sidebar.

infix fun line(line: (Player) -> Component): SidebarBuilder

Adds a line that can change based on the player.

infix fun line(line: Component): SidebarBuilder

Adds a static line to the sidebar.

Link copied to clipboard
infix fun lines(block: LinesBuilder.() -> Unit): SidebarBuilder

Adds multiple lines using the LinesBuilder DSL.

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

Sets a dynamic title for the sidebar.

infix fun title(title: Component): SidebarBuilder

Sets a static title for the sidebar.