node-minecraft-protocol is a Minecraft protocol library for node.js, based on node-protodef. It is available on npm as minecraft-protocol, and allows you to create clients, servers, and to otherwise serialize and deserialize packets.
// Example code for node-minecraft-protocol:
const nmp = require('minecraft-protocol')
const client = nmp.createClient({ host: 'localhost', port: 25565, username: 'amonger' })
client.on('login', packet => {
client.write('chat', { message: 'Hello, world!' })
})
const nmp = require('minecraft-protocol')
const client = nmp.createClient({ host: 'localhost', port: 25565, username: 'amonger' })
client.on('login', packet => {
client.write('chat', { message: 'Hello, world!' })
})
by chipmunk minecraft March 11, 2023