Updated readme screenshot

This commit is contained in:
AlexKvazos
2015-04-30 18:33:15 -05:00
parent 810eb6fca6
commit 423beaf29c
16 changed files with 31 additions and 33 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
module.exports = function(socket) {
module.exports = (socket) => {
socket.on('chat', function(data) {
socket.on('chat', (data) => {
if (socket.mcbot && socket.mcbot.entity) {
socket.mcbot.chat(data.message);
}
+3 -3
View File
@@ -1,9 +1,9 @@
var mineflayer = require('mineflayer');
var events = require('../../bot');
module.exports = function(socket) {
module.exports = (socket) => {
socket.on('server:connect', function(data) {
socket.on('server:connect', (data) => {
if (socket.mcbot) {
socket.emit('buffer:error', 'Pleae disconnect before connecting again');
@@ -22,7 +22,7 @@ module.exports = function(socket) {
socket.connectionParams = data;
// prepare for errors
socket.mcbot.on('error', function(error) {
socket.mcbot.on('error', (error) => {
if (error.toString() === 'Error: write after end') return;
socket.emit('buffer:error', error);
if (socket.mcbot.entity) socket.mcbot.end();
+3 -3
View File
@@ -1,7 +1,7 @@
module.exports = function(socket) {
module.exports = (socket) => {
socket.on('disconnect', function() {
socket.on('disconnect', () => {
if (socket.mcbot) {
socket.mcbot.end();
delete socket.mcbot;
@@ -9,7 +9,7 @@ module.exports = function(socket) {
});
socket.on('bot:disconnect', function() {
socket.on('bot:disconnect', () => {
if (socket.mcbot) {
socket.mcbot.end();
delete socket.mcbot;
+2 -2
View File
@@ -1,6 +1,6 @@
module.exports = function(socket) {
module.exports = (socket) => {
socket.on('players', function() {
socket.on('players', () => {
if (socket.mcbot && socket.mcbot.players) {
socket.emit('bot:players', socket.mcbot.players);
}
+2 -2
View File
@@ -1,6 +1,6 @@
module.exports = function(io) {
module.exports = (io) => {
io.on('connection', function(socket) {
io.on('connection', (socket) => {
// bind all listeners to the socket
require('./events/connection')(socket);