Package Exports
- minecraft-rcon-client
- minecraft-rcon-client/lib/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (minecraft-rcon-client) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
minecraft-rcon-client
Promise based rcon client that i made for communication with my server
Installation
npm i minecraft-rcon-clientUsage
const Rcon = require('minecraft-rcon-protocol')
const client = new Rcon({ // all of those are required!
port: 25575,
host: 'localhost',
password: 'test'
})
client.connect().then(() => {
client.send("time query day").then((response) => {
console.log(response)
client.disconnect()
}).catch(err => {
console.log("An error occurred while sending the query!")
})
}).catch(err => {
console.log("Connection to server cannot be established!")
})