A connector for linking Minecraft Bedrock Edition using Inari (server addon).
  • TypeScript 51.3%
  • JavaScript 48.7%
Find a file
2026-11-03 08:23:13 +01:00
config/default Refactor API key handling: move INARI_API_KEY to variables.json and remove secrets.json 2026-10-30 11:48:58 +01:00
scripts Fix mute notification message logic to correctly reflect mute state 2026-11-02 16:15:34 +01:00
src Fix mute notification message logic to correctly reflect mute state 2026-11-02 16:15:34 +01:00
.gitignore Add Js Scripts 2026-10-30 08:29:04 +01:00
LICENSE Initial commit 2026-10-27 18:45:59 +01:00
manifest.json Actualiser manifest.json 2026-10-30 09:18:27 +01:00
package-lock.json Add InariConnector addon for Minecraft Bedrock Edition 2026-10-27 19:16:45 +01:00
package.json Add InariConnector addon for Minecraft Bedrock Edition 2026-10-27 19:16:45 +01:00
README.md Actualiser README.md 2026-11-03 08:23:13 +01:00
tsconfig.json Add InariConnector addon for Minecraft Bedrock Edition 2026-10-27 19:16:45 +01:00

InariConnector

Minecraft Bedrock Edition addon that connects a server to Inari through WebSocket.

The addon initializes players, periodically sends their position, view direction, and mute status, and automatically attempts to reconnect when the connection is closed.

Features

  • WebSocket connection to Inari when the world loads.
  • Server authentication with an API key.
  • Periodic synchronization of connected players.
  • An Inari code assigned to each initialized player.
  • Commands for displaying a code and managing mute status.
  • Connection and reconnection messages sent to players with the staff tag.

Requirements

  • Minecraft Bedrock Edition Vanilla Server.
  • An Inari WebSocket URL.
  • A valid Inari API key.

The project versions are declared in package.json:

  • TypeScript 7.x.
  • @minecraft/server beta.
  • @minecraft/server-admin beta.
  • @minecraft/server-net beta.

Installation

Clone the project and install its dependencies:

npm install

Then configure the values for your server in:

config/default/variables.json
config/default/permissions.json

Example variables.json:

{
	"INARI_WS_URL": "wss://inari.example.com/ws",
	"INARI_API_KEY": "your-api-key"
}

Replace the example values before starting the server. Never publish the API key in a public repository.

Note: the API key is stored in variables.json and not in secrets.json, because Bedrock secrets cannot be used with WebSocket connections, so the addon would be unable to use it.

Build

Compile the TypeScript source into the scripts/ directory:

npx tsc

The generated entry point is scripts/main.js, as declared in manifest.json.

Installing in Minecraft

  1. Build the project with npx tsc.
  2. Place the addon folder in Minecraft's behavior pack directory.
  3. Activate the behavior pack on the target world.
  4. Make sure the required scripting modules are available in your Minecraft version.
  5. Start the world and check the server logs.

The manifest declares scripts/main.js as the script module entry point.

Minecraft Commands

/inari:inari

Displays the player's Inari code.

/inari:mute

Allows a player to mute themselves.

Force Mute

To force mute a player, simply add the muted tag to them:

/tag <player> add muted

To remove the force mute, remove the tag:

/tag <player> remove muted

Project Structure

src/                  TypeScript source code
src/main.ts           Addon entry point
src/entities/         Entity and player initialization
config/default/       Configuration variables
scripts/              Generated JavaScript files
manifest.json         Behavior pack declaration
tsconfig.json         TypeScript 7 configuration

JavaScript files in scripts/ are generated by the compiler. Modify the code in src/, then rebuild the project.

License

This project is distributed under the GNU Affero General Public License v3.0. See LICENSE for the full license text.