Connector overview
Inari knows nothing about your game by itself. A connector is the bridge: a plugin, addon or mod running on (or next to) your game server that tells Inari where each player is.
Prebuilt connectors
Section titled “Prebuilt connectors”Don’t want to write your own? Use an official connector, maintained in the InariProject organization.
| Game | Connector | Status |
|---|---|---|
| Minecraft Bedrock | connector-minecraft-bedrock-addon | Beta |
| Minecraft Java (Spigot / Paper) | Plugin | In development |
Responsibilities
Section titled “Responsibilities”A connector must:
- Open a WebSocket to
wss://<your-inari>/ws. - Authenticate with the server’s
API_KEYon a channel. - Give each player a code and send them either a link to Inari or just the code, which they enter manually on the Inari page (see Connecting players).
- Every ~300 ms, send the position, orientation, group and state of every player with
sync_connector_state.
It may also read the response to show muted or deafened status in game.
Setup checklist
Section titled “Setup checklist”| Step | Detail |
|---|---|
Set an API_KEY |
In the Inari environment. Keep it secret: it grants full control of the channel. |
| Choose a channel | One connector per channel. Use another channel for another game server. |
| Use the right URL | ws:// for a local test, wss:// behind your reverse proxy. |
| Generate player codes | At least 6 characters, unique in the channel. Random strings work well. |
| Reconnect | If the socket closes, reconnect and authenticate again. |
Data to provide per player
Section titled “Data to provide per player”| Field | Typical source |
|---|---|
code |
The code you generated for this player. |
position |
World coordinates of the player’s character. |
head |
Direction the character is looking at, as a unit vector (length 1, each component between -1 and 1). |
is_force_muted |
Dead, spectating, in a cutscene… |
group |
Team, world, dimension or room, so only relevant players hear each other. |
display_name |
Character or account name. |
actions |
In-game keybind to toggle mute or deafen. |
Where to go next
Section titled “Where to go next”- Example connector: run the Node.js connector shipped with Inari.
- Protocol reference: every message and field.