Modularized event listeners

This commit is contained in:
AlexKvazos
2015-04-29 11:46:09 -05:00
parent fcb2236d12
commit 5046fd49ba
10 changed files with 75 additions and 64 deletions
+1 -4
View File
@@ -1,11 +1,8 @@
var mineflayer = require('mineflayer');
module.exports = function(io) {
io.on('connection', function(socket) {
// bind all events to the socket
// bind all listeners to the socket
require('./events/connection')(socket);
require('./events/disconnection')(socket);
require('./events/chat')(socket);