selector

open fun selector(key: String, styler: Styler.() -> Unit): ComponentBuilder

Appends a selector component with the specified selector pattern and applies additional configuration.

Return

this component builder for chaining

Parameters

key

the selector pattern

styler

the styler to apply


abstract infix fun selector(key: String): ComponentBuilder

Appends a selector component with the specified selector pattern. Selectors target entities in the game world (e.g., "@a" for all players, "@p" for nearest player, "@etype=cow" for cows).

Return

this component builder for chaining

Parameters

key

the selector pattern (e.g., "@a", "@p", "@etype=cow")


Extension property to append this string as a selector component. Uses this string as the entity selector pattern (@a, @p, etc.).