Skip to content

benjajaja/mc_jsonapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Minecraft JSONAPI-plugin module

Check https://github.com/alecgorge/jsonapi for the minecraft plugin.

Installation:  
`npm install mc_jsonapi`

Example usage:
var JSONAPI = require('mc_jsonapi');

var json = JSONAPI(20060, 'username', 'password', 'salt');
json.connect(5, 4, function(status) {
	if (status === true) {
		json.on('error', function(message, error) {
			// ...
		});
		
		json.on('chat', function(data) {
			console.log(data);
		});

		json.subscribe('chat');
		json.runMethod('runConsoleCommand', ['say Hello world!']);

		setTimeout(json.unload, 10000);
	} else {
		// could not connect
	}
});

About

minecraft jsonapi-plugin connection

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published