mirror of
https://github.com/ChomeNS/chomens-bot-mc.git
synced 2024-11-23 07:38:00 -05:00
forgor
This commit is contained in:
parent
5c15e0dc4b
commit
bad7207eaf
1 changed files with 2 additions and 1 deletions
3
bot.js
3
bot.js
|
@ -27,7 +27,6 @@ const mineflayer = require('mineflayer')
|
|||
*/
|
||||
async function createBot (server, config, getBots, setNewBot, dcclient, rl) {
|
||||
const bot = new EventEmitter()
|
||||
bot.setMaxListeners(Infinity) // is this bad code?
|
||||
bot.options = {
|
||||
username: !server.kaboom
|
||||
? 'ChomeNS_Bot'
|
||||
|
@ -42,6 +41,8 @@ async function createBot (server, config, getBots, setNewBot, dcclient, rl) {
|
|||
hideErrors: true
|
||||
}
|
||||
bot._client = mc.createClient(bot.options)
|
||||
bot.setMaxListeners(Infinity) // is this bad code?
|
||||
bot._client.setMaxListeners(Infinity) // this too
|
||||
bot.version = bot._client.version
|
||||
bot.write = (name, data) => bot._client.write(name, data)
|
||||
bot.end = (reason = 'end', event) => {
|
||||
|
|
Loading…
Reference in a new issue