bukkit-openhab-client
Version:
Client for the Minecraft bukkit-openhab-plugin
13 lines (9 loc) • 358 B
JavaScript
const { connect, CommandType } = require('./dist/index');
let client = connect('localhost');
setTimeout(function () {
client.send(CommandType.PLAYER_LOCATION, { playerName: 'Welteki', location: { x: 563, y: 60 } });
}, 8000)
client.on('error', console.log);
client.on('player', players => {
players.forEach(player => console.log(player.location));
})