[API reference](https://jsprismarine.dev/api/index.md) / [@jsprismarine/prismarine](https://jsprismarine.dev/api/@jsprismarine/prismarine/index.md) / [scripting/DataDrivenScreens](https://jsprismarine.dev/api/@jsprismarine/prismarine/scripting/DataDrivenScreens/index.md) / PropertyScreens

# Class: PropertyScreens

Defined in: [packages/prismarine/src/scripting/DataDrivenScreens.ts:126](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/scripting/DataDrivenScreens.ts#L126)

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

- [`DataDrivenScreens`](https://jsprismarine.dev/api/@jsprismarine/prismarine/scripting/DataDrivenScreens/index.md#datadrivenscreens)

## Constructors

### Constructor

> **new PropertyScreens**(`send`): `PropertyScreens`

Defined in: [packages/prismarine/src/scripting/DataDrivenScreens.ts:132](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/scripting/DataDrivenScreens.ts#L132)

#### 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](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/scripting/DataDrivenScreens.ts#L175)

Asks the client to close one screen.

#### Parameters

##### formId

`number`

#### Returns

`void`

#### Implementation of

[`DataDrivenScreens`](https://jsprismarine.dev/api/@jsprismarine/prismarine/scripting/DataDrivenScreens/index.md#datadrivenscreens).[`close`](https://jsprismarine.dev/api/@jsprismarine/prismarine/scripting/DataDrivenScreens/index.md#close)

***

### closed()

> **closed**(`formId`): `boolean`

Defined in: [packages/prismarine/src/scripting/DataDrivenScreens.ts:190](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/scripting/DataDrivenScreens.ts#L190)

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

[`DataDrivenScreens`](https://jsprismarine.dev/api/@jsprismarine/prismarine/scripting/DataDrivenScreens/index.md#datadrivenscreens).[`closed`](https://jsprismarine.dev/api/@jsprismarine/prismarine/scripting/DataDrivenScreens/index.md#closed)

***

### show()

> **show**(`formId`, `screen`): `void`

Defined in: [packages/prismarine/src/scripting/DataDrivenScreens.ts:135](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/scripting/DataDrivenScreens.ts#L135)

Sets the screen's property, sends the updates that follow it, and opens the screen.

#### Parameters

##### formId

`number`

##### screen

[`DataDrivenScreen`](https://jsprismarine.dev/api/@jsprismarine/script-host/host/world/index.md#datadrivenscreen)

#### Returns

`void`

#### Implementation of

[`DataDrivenScreens`](https://jsprismarine.dev/api/@jsprismarine/prismarine/scripting/DataDrivenScreens/index.md#datadrivenscreens).[`show`](https://jsprismarine.dev/api/@jsprismarine/prismarine/scripting/DataDrivenScreens/index.md#show)

***

### update()

> **update**(`property`, `__namedParameters`): `void`

Defined in: [packages/prismarine/src/scripting/DataDrivenScreens.ts:156](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/scripting/DataDrivenScreens.ts#L156)

Changes one path of a property the client was sent.

#### Parameters

##### property

`string`

##### \_\_namedParameters

[`DataDrivenPathValue`](https://jsprismarine.dev/api/@jsprismarine/script-host/host/world/index.md#datadrivenpathvalue)

#### Returns

`void`

#### Implementation of

[`DataDrivenScreens`](https://jsprismarine.dev/api/@jsprismarine/prismarine/scripting/DataDrivenScreens/index.md#datadrivenscreens).[`update`](https://jsprismarine.dev/api/@jsprismarine/prismarine/scripting/DataDrivenScreens/index.md#update)

***

### written()

> **written**(`__namedParameters`): [`DataDrivenWrite`](https://jsprismarine.dev/api/@jsprismarine/prismarine/scripting/DataDrivenScreens/index.md#datadrivenwrite) \| `undefined`

Defined in: [packages/prismarine/src/scripting/DataDrivenScreens.ts:180](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/scripting/DataDrivenScreens.ts#L180)

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`](https://jsprismarine.dev/api/@jsprismarine/protocol/classes/DataStoreUpdate.md) \| `null`

`Update` before protocol 2259, the single data store update the client applies. `null` from 2259.

###### variableUpdate

[`DataStoreVariableUpdate`](https://jsprismarine.dev/api/@jsprismarine/protocol/index.md#datastorevariableupdate) \| `null` = `...`

`Update` from protocol 2259, keyed by variable name. `null` before 2259.

#### Returns

[`DataDrivenWrite`](https://jsprismarine.dev/api/@jsprismarine/prismarine/scripting/DataDrivenScreens/index.md#datadrivenwrite) \| `undefined`

#### Implementation of

[`DataDrivenScreens`](https://jsprismarine.dev/api/@jsprismarine/prismarine/scripting/DataDrivenScreens/index.md#datadrivenscreens).[`written`](https://jsprismarine.dev/api/@jsprismarine/prismarine/scripting/DataDrivenScreens/index.md#written)
