diff --git a/client.js b/client.js index db143b1..e280296 100644 --- a/client.js +++ b/client.js @@ -475,11 +475,18 @@ function mc_login(){ mc_bot.on("error", function(){ - console.log("Minecraft: error occured, disconnecting"); - mc_bot.end(); - mc_logged_in = false; - setTimeout(mc_login, 5000); // reconnect after 5 seconds + console.log("Minecraft: error occured"); }); + + mc_bot.on("playerJoined", function(player){ + + send(1, ">" + player.username + " has joined deekcraft"); + }) + + mc_bot.on("playerLeft", function(player){ + + send(1, ">" + player.username + " has left deekcraft"); + }) } mc_login();