<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [client](./client.md) &gt; [HytopiaUI](./client.hytopiaui.md) &gt; [sendData](./client.hytopiaui.senddata.md)

## HytopiaUI.sendData() method

Sends data from your UI to the game server. The server receives this via `player.ui.on(PlayerUIEvent.DATA, callback)`<!-- -->. Use this to notify the server of player actions taken in your custom UI.

**Signature:**

```typescript
sendData(data: object): void;
```

## Parameters

<table><thead><tr><th>

Parameter


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

data


</td><td>

object


</td><td>

Data object to send to the server


</td></tr>
</tbody></table>

**Returns:**

void

