mirror of
https://github.com/ChomeNS/chomens-bot-mc.git
synced 2024-11-14 10:44:55 -05:00
fix target.chat (because new nmp version)
This commit is contained in:
parent
8c17e0c8c9
commit
3993d67a8b
3 changed files with 6 additions and 5 deletions
|
@ -39,7 +39,8 @@ function inject (bot, dcclient, config) {
|
|||
const clientPacketBlacklist = []
|
||||
const targetPacketBlacklist = []
|
||||
|
||||
target.chat = function (message) {
|
||||
// target.chat exist so yeah..
|
||||
target.sendMessage = function (message) {
|
||||
if (minecraftVersionToNumber(target.version) >= 1.19) {
|
||||
if (message.startsWith('/')) {
|
||||
target.write('chat_command', {
|
||||
|
|
|
@ -50,7 +50,7 @@ function inject (bot, client, target, config, clientPacketBlacklist) {
|
|||
]
|
||||
})
|
||||
} else {
|
||||
target.chat(data)
|
||||
target.sendMessage(data)
|
||||
}
|
||||
})
|
||||
};
|
||||
|
|
|
@ -34,10 +34,10 @@ function inject (bot, client, target, config) {
|
|||
|
||||
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 (!op && config.self_care.op) target.sendMessage('/minecraft:op @s[type=player]')
|
||||
if (!cspy && config.self_care.cspy) target.sendMessage('/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.sendMessage('/minecraft:gamemode creative @s[type=player]')
|
||||
}, config.self_care_check_interval)
|
||||
|
||||
bot.on('end', () => {
|
||||
|
|
Loading…
Reference in a new issue