minecraft-jsonapi
v0.0.3
Published
Interfaces with the json api plugin for minecraft
Downloads
9
Maintainers
Readme
Features
Simple yet powerful minecraft JSONAPI module
Actual real life documentation
Method docs
Usage
Import
const Minecraft = require("minecraft-jsonapi");
Options
const options = {
host: "127.0.0.1",
port: "25565",
https: false,
username: "username",
password: "password",
};
Rest Call
const minecraft = Minecraft.createRequest();
const resultPromise = minecraft.add("server.performance").dispatch(options);
resultPromise.then(console.log).catch(console.error);
Streaming API
const minecraft = Minecraft.createRequest();
minecraft.add("console", []).add("chat", []).follow(options, console.log)