yea
This commit is contained in:
parent
3d49e6f1a6
commit
243d49a6e4
15
client.js
15
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();
|
||||
|
|
Loading…
Reference in New Issue