mirror of
https://github.com/ChomeNS/chomens-bot-mc.git
synced 2024-11-14 10:44:55 -05:00
i fixed the kaboom ploblem which took ages to figure out
This commit is contained in:
parent
3f10357d94
commit
963b627219
5 changed files with 9 additions and 15 deletions
10
config.js
10
config.js
|
@ -58,27 +58,27 @@ module.exports = {
|
|||
{
|
||||
'host': 'play.kaboom.pw',
|
||||
'port': 25565,
|
||||
'kaboom': false,
|
||||
'kaboom': true,
|
||||
},
|
||||
{
|
||||
'host': 'sus.shhnowisnottheti.me',
|
||||
'port': 25565,
|
||||
'kaboom': false,
|
||||
'kaboom': true,
|
||||
},
|
||||
{
|
||||
'host': 'kitsune.icu',
|
||||
'port': 25565,
|
||||
'kaboom': false,
|
||||
'kaboom': true,
|
||||
},
|
||||
{
|
||||
'host': '71.179.136.66',
|
||||
'port': 25565,
|
||||
'kaboom': false,
|
||||
'kaboom': true,
|
||||
},
|
||||
// {
|
||||
// 'host': 'mc.chomens41793.ga',
|
||||
// 'port': 25565,
|
||||
// 'kaboom': true,
|
||||
// 'kaboom': false,
|
||||
// },
|
||||
],
|
||||
};
|
||||
|
|
|
@ -48,7 +48,7 @@ function inject(bot, dcclient, config) {
|
|||
z: core.start.z + relativePosition.z,
|
||||
};
|
||||
|
||||
if (kaboom) bot.write('update_command_block', {location, command: command.substring(0, 32767), mode: 0, flags: 0});
|
||||
if (!kaboom) bot.write('update_command_block', {location, command: command.substring(0, 32767), mode: 0, flags: 0});
|
||||
bot.write('update_command_block', {location, command: command.substring(0, 32767), mode: kaboom ? 2 : 1, flags: 0b100});
|
||||
} catch (e) {
|
||||
bot.console.error(e);
|
||||
|
@ -126,7 +126,7 @@ function inject(bot, dcclient, config) {
|
|||
// if (core.start === packet.chunkCoordinates || core.end === packet.chunkCoordinates) fillCore();
|
||||
// });
|
||||
|
||||
bot.on('end', () => {
|
||||
bot.once('end', () => {
|
||||
clearInterval(interval);
|
||||
});
|
||||
|
||||
|
|
|
@ -50,23 +50,17 @@ function inject(bot, dcclient, config) {
|
|||
|
||||
targetClient.on('end', () => {
|
||||
targetClient.end();
|
||||
targetClient.removeAllListeners();
|
||||
client.removeAllListeners();
|
||||
endedTarget = true;
|
||||
});
|
||||
|
||||
client.on('end', function() {
|
||||
endedClient = true;
|
||||
targetClient.end();
|
||||
targetClient.removeAllListeners();
|
||||
client.removeAllListeners();
|
||||
bot.console.info(`[Proxy] ${client.username} ended`);
|
||||
});
|
||||
|
||||
client.on('error', function() {
|
||||
endedClient = true;
|
||||
targetClient.removeAllListeners();
|
||||
client.removeAllListeners();
|
||||
bot.console.info(`[Proxy] ${client.username} got error`);
|
||||
});
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ function inject(bot, client, targetClient, config) {
|
|||
});
|
||||
|
||||
const interval = setInterval(() => {
|
||||
if (bot.options.host !== '0.tcp.ap.ngrok.io') {
|
||||
if (bot.options.kaboom) {
|
||||
if (!op && config.self_care.op) targetClient.chat('/minecraft:op @s[type=player]');
|
||||
if (!cspy && config.self_care.cspy) targetClient.chat('/commandspy:commandspy on');
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ function inject(bot, dcclient, config) {
|
|||
});
|
||||
|
||||
const interval = setInterval(() => {
|
||||
if (bot.options.host !== '0.tcp.ap.ngrok.io') {
|
||||
if (bot.options.kaboom) {
|
||||
if (!prefix && config.self_care.prefix) bot.chat('/extras:prefix &8[&eChomeNS Bot&8]');
|
||||
if (!op && config.self_care.op) bot.chat('/minecraft:op @s[type=player]');
|
||||
if (!cspy && config.self_care.cspy) bot.chat('/commandspy:commandspy on');
|
||||
|
|
Loading…
Reference in a new issue