mirror of
https://github.com/ChomeNS/chomens-bot-mc.git
synced 2024-11-14 10:44:55 -05:00
remove gamemode self care from proxy
now i can freely gamemode!%1544
This commit is contained in:
parent
f9e2074446
commit
3240e1fbb9
1 changed files with 11 additions and 11 deletions
|
@ -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', () => {
|
||||
|
|
Loading…
Reference in a new issue