- npm
npm install @script-bridge/server
- yarn
yarn add @script-bridge/server
- pnpm
pnpm add @script-bridge/server
- bun
bun install @script-bridge/server
- JavaScript
const { ScriptBridgeServer } = require('@script-bridge/server');
const server = new ScriptBridgeServer({ port: 8000 });
server.start();
- TypeScript
import { ScriptBridgeServer } from '@script-bridge/server';
const server = new ScriptBridgeServer({ port: 8000 });
server.start();
- Download the client from the releases page.
- Put the client in your project.
Note
You need to enable Beta API toggle and allow @minecraft/server-net
module in [BDS]/config/permissions.json
.
import { ScriptBridgeClient } from './path/to/script-bridge-client';
const client = new ScriptBridgeClient({ url: 'http://localhost:8000' });
client.connect();