selfcare fixes
This commit is contained in:
parent
e062856ae7
commit
5a1eff9e1b
2 changed files with 11 additions and 5 deletions
|
@ -19,7 +19,7 @@ function inject (bot) {
|
|||
bot.on('chat_queue_tick', () => {
|
||||
if (permissionLevel === 0) bot.chat.queue.unshift('/op @s[type=player]')
|
||||
else if (gamemode !== 1) bot.chat.queue.unshift('/gamemode creative')
|
||||
else if (!commandSpyEnabled) bot.chat.queue.unshift('/c on')
|
||||
else if (!commandSpyEnabled && bot.features.commandSpy) bot.chat.queue.unshift('/c on')
|
||||
})
|
||||
|
||||
bot.on('packet.entity_status', packet => {
|
||||
|
@ -28,8 +28,10 @@ function inject (bot) {
|
|||
})
|
||||
|
||||
bot.on('system_chat', (message) => {
|
||||
if (message === COMMANDSPY_ENABLED_MESSAGE.text || util.isDeepStrictEqual(message, COMMANDSPY_ENABLED_MESSAGE) || util.isDeepStrictEqual(message, COMMANDSPY_ENABLED_MESSAGE_2)) commandSpyEnabled = true
|
||||
else if (message === COMMANDSPY_DISABLED_MESSAGE.text || util.isDeepStrictEqual(message, COMMANDSPY_DISABLED_MESSAGE) || util.isDeepStrictEqual(message, COMMANDSPY_DISABLED_MESSAGE_2)) commandSpyEnabled = false
|
||||
if (bot.features.commandSpy) {
|
||||
if (message === COMMANDSPY_ENABLED_MESSAGE.text || util.isDeepStrictEqual(message, COMMANDSPY_ENABLED_MESSAGE) || util.isDeepStrictEqual(message, COMMANDSPY_ENABLED_MESSAGE_2)) commandSpyEnabled = true
|
||||
else if (message === COMMANDSPY_DISABLED_MESSAGE.text || util.isDeepStrictEqual(message, COMMANDSPY_DISABLED_MESSAGE) || util.isDeepStrictEqual(message, COMMANDSPY_DISABLED_MESSAGE_2)) commandSpyEnabled = false
|
||||
}
|
||||
})
|
||||
|
||||
bot.on('player_added', (player) => {
|
||||
|
@ -47,7 +49,7 @@ function inject (bot) {
|
|||
})
|
||||
|
||||
bot.on('packet.respawn', packet => {
|
||||
gamemode = packet.gameMode
|
||||
gamemode = packet.gamemode
|
||||
})
|
||||
|
||||
bot.on('packet.update_health', (packet) => {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
const defaults = {
|
||||
amnesicCommandBlocks: false,
|
||||
commandNamespaces: false
|
||||
commandNamespaces: false,
|
||||
commandSpy: false
|
||||
}
|
||||
|
||||
function inject (bot, options) {
|
||||
|
@ -32,6 +33,9 @@ function inject (bot, options) {
|
|||
case 'extras':
|
||||
bot.features.amnesicCommandBlocks = true
|
||||
break
|
||||
case 'commandspy':
|
||||
bot.features.commandSpy = true
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue