This is a fork of rcon-client that was created because the author of rcon-client didn't respond fast enough for us.
A simple and easy to use RCON client made to work with Minecraft servers. It's written in Typescript and uses async methods.
import { Rcon } from "rcon-client"
const rcon = await Rcon.connect({
host: "localhost", port: 25575,
password: "password"
})
console.log("Connected")
let listResponse = await rcon.send("list")
console.log(listResponse)
let responses = await Promise.all([
rcon.send("help"),
rcon.send("whitelist list")
])
for (response of responses) {
console.log(response)
}
rcon.end()
More examples are in the examples/
folder.
Read more about the RCON Protocol
MIT