open
fun open(ownerPlugin: Plugin, player: Player, definition: ScreenDefinition): RemoteScreenSession(source)
Deprecated
Use UiDefinition.open(ownerPlugin, player).
Consumes one screen definition and replaces the player's previous Strata screen. Unavailable clients and unsupported declarations return a terminal handle with a typed reason. On Folia, create captured mutable state through execute, or use the definition-factory overload.
fun open(ownerPlugin: Plugin, player: Player, definition: () -> ScreenDefinition): RemoteScreenSession(source)
Deprecated
Use PaperUi.open(ownerPlugin, player) with a UiDefinition factory.
Creates state and a definition within the player's UI owner, preserving it across Folia region migrations. Call on the player's region (or Paper's primary thread), and construct mutable UI state inside definition. The factory runs synchronously once, before retained screen evaluation; handlers run on that player's region.