API reference / @jsprismarine/prismarine / scripting/DataDrivenScreens / PropertyScreens
Class: PropertyScreens
Defined in: packages/prismarine/src/scripting/DataDrivenScreens.ts:126
The screens of a client at protocol 2193 or 2225. A Data Store Change sets the whole property, holding maps, and a Data Store Update changes one path, such as layout[7].value. A screen the client reports closed has its property set to a change that carries no value.
Each property counts how often it was set, and each path how often it was updated since; a client's write to a path counts too, so the server's next update of that path follows it.
Implements
Constructors
Constructor
new PropertyScreens(
send):PropertyScreens
Defined in: packages/prismarine/src/scripting/DataDrivenScreens.ts:132
Parameters
send
(packet) => void
Sends one packet to the client.
Returns
PropertyScreens
Methods
close()
close(
formId):void
Defined in: packages/prismarine/src/scripting/DataDrivenScreens.ts:175
Asks the client to close one screen.
Parameters
formId
number
Returns
void
Implementation of
closed()
closed(
formId):boolean
Defined in: packages/prismarine/src/scripting/DataDrivenScreens.ts:190
Takes a client's report that a screen closed and clears its property; false when it was not open.
Parameters
formId
number
Returns
boolean
Implementation of
show()
show(
formId,screen):void
Defined in: packages/prismarine/src/scripting/DataDrivenScreens.ts:135
Sets the screen's property, sends the updates that follow it, and opens the screen.
Parameters
formId
number
screen
Returns
void
Implementation of
update()
update(
property,__namedParameters):void
Defined in: packages/prismarine/src/scripting/DataDrivenScreens.ts:156
Changes one path of a property the client was sent.
Parameters
property
string
__namedParameters
Returns
void
Implementation of
written()
written(
__namedParameters):DataDrivenWrite|undefined
Defined in: packages/prismarine/src/scripting/DataDrivenScreens.ts:180
Takes a client's write to a path of an open screen's property; undefined when it names none or is stale.
Parameters
__namedParameters
update
DataStoreUpdate | null
Update before protocol 2259, the single data store update the client applies. null from 2259.
variableUpdate
DataStoreVariableUpdate | null = ...
Update from protocol 2259, keyed by variable name. null before 2259.
Returns
DataDrivenWrite | undefined