mindustry-node-control
v1.0.1
Published
The node.js library that allows you to manage your Mindustry server.
Downloads
3
Readme
Mindustry Node Control
The node.js library that allows you to manage your Mindustry server.
Installation
Using npm:
npm i mindustry-node-control
Usage
First you have to import module:
const { Server } = require('mindustry-node-control');
// For locally hosted server
const myServer = new Server('127.0.0.1');
Get ping:
myServer.ping((ping) => {
console.log(`${server.hostname}:${server.socketPort} ping is ${ping}!`);
});
Send command:
// Create a connection
myServer.connect(() => {
server.command('host');
});
NOTE: For this module to work, you need to open socket input on the server, run this command in the server console:
config socketInput true
Contributing
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
License
For license see LICENSE.txt