Skip to content

Repository files navigation

rcon

GitHub Workflow StatusGitHubnpm (scoped)

RCON Minecraft client written in TypeScript

Documentation

Installation

Install the package:

$ npm install @minecraft-js/rcon

And then import it in your JavaScript/TypeScript file

const{ RCONClient }=require('@minecraft-js/rcon');// CommonJSimport{RCONClient}from'@minecraft-js/rcon';// ES6

Connect

constclient=newRCONClient('127.0.0.1','my_password');client.connect();

Listen for events

client.on('authenticated',()=>{// Do stuff});client.on('error',()=>{// Do stuff});// ...

Execute a command

client.on('response',(requestId,packet)=>{// Do something with requestId and packet// Access the command response by `packet.payload`});constrequestId=client.executeCommand('whitelist list');

Full doc: https://minecraftjs.github.io/rcon/

About

RCON Minecraft client written in TypeScript

Topics

Resources

Code of conduct

Stars

10 stars

Watchers

0 watching

Forks

Releases

Used by

Contributors

Languages

Generated from MinecraftJS/template