mirror of
https://github.com/ChomeNS/chomens-bot-mc.git
synced 2024-11-27 09:35:35 -05:00
auto refill core ON BREAK + better self_care
This commit is contained in:
parent
0b8af86ca5
commit
6d68fa18e4
3 changed files with 10 additions and 2 deletions
2
index.js
2
index.js
|
@ -169,7 +169,7 @@ function main() {
|
|||
} catch (e) {
|
||||
return;
|
||||
}
|
||||
}, 500);
|
||||
}, 400);
|
||||
|
||||
module.exports = function() {
|
||||
return bot;
|
||||
|
|
|
@ -63,6 +63,10 @@ function inject(bot) {
|
|||
bot.emit('position', position);
|
||||
});
|
||||
|
||||
bot._client.on('block_change', (packet) => {
|
||||
if (core.isCore(packet.location) && packet.type===0) fillCore();
|
||||
});
|
||||
|
||||
bot.on('position', fillCore);
|
||||
|
||||
fillCore();
|
||||
|
|
|
@ -54,7 +54,7 @@ function inject(bot) {
|
|||
gameMode = data.gameMode;
|
||||
});
|
||||
|
||||
setInterval(() => {
|
||||
const interval = setInterval(() => {
|
||||
if (!op) {
|
||||
bot.chat('/minecraft:op @s[type=player]');
|
||||
return;
|
||||
|
@ -66,6 +66,10 @@ function inject(bot) {
|
|||
if (!prefix) bot.chat('/extras:prefix &8[&eChomeNS Bot&8]');
|
||||
if (muted) bot.chat('/essentials:mute ' + bot.uuid);
|
||||
}, 2000);
|
||||
|
||||
bot.once('end', () => {
|
||||
clearInterval(interval);
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = {inject};
|
||||
|
|
Loading…
Reference in a new issue