mirror of
https://github.com/unmojang/node-minecraft-protocol.git
synced 2025-09-28 13:45:37 -04:00
emit packets in their own channel as well
This commit is contained in:
parent
4237787082
commit
646c7676c6
1
index.js
1
index.js
@ -169,6 +169,7 @@ Client.prototype.connect = function(port, host) {
|
|||||||
if (! parsed) break;
|
if (! parsed) break;
|
||||||
incomingBuffer = incomingBuffer.slice(parsed.size);
|
incomingBuffer = incomingBuffer.slice(parsed.size);
|
||||||
self.emit('packet', parsed.results);
|
self.emit('packet', parsed.results);
|
||||||
|
self.emit('packet-' + parsed.results.id, parsed.results);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user