remove gamemode self care from proxy

now i can freely gamemode!%1544
This commit is contained in:
ChomeNS 2022-12-28 07:57:07 +07:00
parent f9e2074446
commit 3240e1fbb9

View file

@ -2,7 +2,7 @@
function inject (bot, client, target, config) {
let cspy = false
let op = true
let gameMode = 1
// let gameMode = 1
target.on('message', (data) => {
if (data.toString() === 'Successfully enabled CommandSpy' || data.toString() === ' Enabled your command spy.' || data.toString() === ' Your command spy is already enabled.') cspy = true
@ -22,22 +22,22 @@ function inject (bot, client, target, config) {
}
})
target.on('game_state_change', (data) => {
if (data.reason !== 3) return
gameMode = data.gameMode
})
target.on('login', (data) => {
gameMode = data.gameMode
})
// target.on('game_state_change', (data) => {
// if (data.reason !== 3) return
//
// gameMode = data.gameMode
// })
//
// target.on('login', (data) => {
// gameMode = data.gameMode
// })
const interval = setInterval(() => {
if (bot.options.kaboom) {
if (!op && config.self_care.op) target.chat('/minecraft:op @s[type=player]')
if (!cspy && config.self_care.cspy) target.chat('/commandspy:commandspy on')
}
if (gameMode !== 1 && config.self_care.gamemode) target.chat('/minecraft:gamemode creative @s[type=player]')
// if (gameMode !== 1 && config.self_care.gamemode) target.chat('/minecraft:gamemode creative @s[type=player]')
}, config.self_care_check_interval)
bot.on('end', () => {