From 5f769caebcba97f4faa008ed02dd9b8f18c25390 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Sat, 5 Jan 2013 05:17:27 -0500 Subject: [PATCH] minor API update * move constants.STRING_MAX_LENGTH -> protocol.STRING_MAX_LENGTH * expose protocol.version * expose protocol.minecraftVersion * expose protocol.sessionVerson * expose protocol.parsePacket * expose protocol.createPacketBuffer --- index.js | 2 +- lib/protocol.js | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index bdf3153..d84e8a7 100644 --- a/index.js +++ b/index.js @@ -15,7 +15,7 @@ module.exports = { Client: Client, Server: Server, ping: require('./lib/ping'), - constants: protocol.constants, + protocol: protocol, }; function createServer(options) { diff --git a/lib/protocol.js b/lib/protocol.js index ea35ea4..6e2d12a 100644 --- a/lib/protocol.js +++ b/lib/protocol.js @@ -8,9 +8,7 @@ module.exports = { sessionVersion: 13, parsePacket: parsePacket, createPacketBuffer: createPacketBuffer, - constants: { - STRING_MAX_LENGTH: STRING_MAX_LENGTH, - }, + STRING_MAX_LENGTH: STRING_MAX_LENGTH, }; var packets = {