diff --git a/bot.js b/bot.js index 524bbda..6a62517 100644 --- a/bot.js +++ b/bot.js @@ -36,6 +36,7 @@ async function createBot(server, config, getBots, dcclient) { host: /* process.argv[2] */ server.host, port: /* process.argv[3] ? Number(process.argv[3]) : 25565*/ server.port, version: config.version, + kaboom: server.kaboom, checkTimeoutInterval: '30000', keepAlive: false, hideErrors: true, diff --git a/config.js b/config.js index 62a375a..738f0d4 100644 --- a/config.js +++ b/config.js @@ -11,6 +11,7 @@ module.exports = { 'normalKey': '�iB_D���k��j8H�{?[/ڭ�f�}Ѣ�^-=�Ț��v]��g>��=c', 'ownerHashKey': 'b)R��nF�CW���#�\\[�S*8"t^eia�Z��k����K1�8zȢ�', }, + 'proxy': true, 'console': true, 'useChat': false, 'core': { @@ -57,22 +58,27 @@ module.exports = { { 'host': 'play.kaboom.pw', 'port': 25565, + 'kaboom': false, }, { 'host': 'sus.shhnowisnottheti.me', 'port': 25565, + 'kaboom': false, }, { 'host': 'kitsune.icu', 'port': 25565, + 'kaboom': false, }, { 'host': '71.179.136.66', 'port': 25565, + 'kaboom': false, }, // { // 'host': 'mc.chomens41793.ga', // 'port': 25565, + // 'kaboom': true, // }, ], }; diff --git a/plugins/commands.js b/plugins/commands.js index 6891422..fd737b5 100644 --- a/plugins/commands.js +++ b/plugins/commands.js @@ -52,7 +52,7 @@ function inject(bot, dcclient, config) { // try catch cuz TypeError: Cannot read properties of undefined (reading 'replace') try { const usernameraw = _username.replace(/§[a-f0-9rlonmk]/g, '').replace(/§/g, ''); - const sender = bot.options.host === 'sus.shhnowisnottheti.me' && _sender !== '00000000-0000-0000-0000-000000000000' ? _sender : bot.playersAddedPlayers[usernameraw]; + const sender = _sender !== '00000000-0000-0000-0000-000000000000' ? _sender : bot.playersAddedPlayers[usernameraw]; let username; if (!bot.getplayerusername[sender]) username = usernameraw; else username = bot.getplayerusername[sender]; diff --git a/plugins/core.js b/plugins/core.js index 35d051d..afe7a0a 100644 --- a/plugins/core.js +++ b/plugins/core.js @@ -40,7 +40,7 @@ function inject(bot, dcclient, config) { relativePosition.z = 0; } - const impulseMode = bot.options.host === '0.tcp.ap.ngrok.io'; + const kaboom = bot.options.kaboom; const location = { x: core.start.x + relativePosition.x, @@ -48,8 +48,8 @@ function inject(bot, dcclient, config) { z: core.start.z + relativePosition.z, }; - if (impulseMode) 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: impulseMode ? 2 : 1, flags: 0b100}); + 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); } diff --git a/plugins/proxy.js b/plugins/proxy.js index dfd06cc..6e465ac 100644 --- a/plugins/proxy.js +++ b/plugins/proxy.js @@ -3,6 +3,8 @@ const mc = require('minecraft-protocol'); const {loadPlugins} = require('../util/loadPlugins'); function inject(bot, dcclient, config) { + if (!config.proxy) return; + let index; config.servers.forEach((server, _index) => { if (bot.options.host !== server.host) return;