This commit is contained in:
lolcat 2024-11-03 16:50:26 -05:00
parent 3d49e6f1a6
commit 243d49a6e4
1 changed files with 11 additions and 4 deletions

View File

@ -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();