mirror of
https://github.com/unmojang/node-minecraft-protocol.git
synced 2025-09-29 14:13:45 -04:00
added serverside plugin channel support
This commit is contained in:
parent
25728029d4
commit
947c4c0587
@ -8,6 +8,7 @@ const bufferEqual = require('buffer-equal');
|
||||
const Server = require('./server');
|
||||
const UUID = require('uuid-1345');
|
||||
const endianToggle = require('endian-toggle');
|
||||
const pluginChannels = require('./client/pluginChannels');
|
||||
|
||||
module.exports=createServer;
|
||||
|
||||
@ -40,6 +41,7 @@ function createServer(options) {
|
||||
server.playerCount = 0;
|
||||
server.onlineModeExceptions = {};
|
||||
server.favicon = options.favicon || undefined;
|
||||
|
||||
server.on("connection", function(client) {
|
||||
client.once('set_protocol', onHandshake);
|
||||
client.once('login_start', onLogin);
|
||||
@ -272,6 +274,7 @@ function createServer(options) {
|
||||
client.once('end', function() {
|
||||
server.playerCount -= 1;
|
||||
});
|
||||
pluginChannels(client, options);
|
||||
server.emit('login', client);
|
||||
}
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user