Skip to content

Commit

Permalink
fix mcdata import
Browse files Browse the repository at this point in the history
  • Loading branch information
plexigras committed Jul 28, 2017
1 parent 49c4ae9 commit e5a4d37
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion examples/trader.js
Expand Up @@ -26,7 +26,10 @@ const bot = mineflayer.createBot({
password: process.argv[5],
verbose: true
})
const mcdata = require('minecraft-data')(bot.version)
let mcdata
bot.once('inject_allowed', () => {
mcdata = require('minecraft-data')(bot.version)
})

bot.on('chat', (username, message) => {
if (username === bot.username) return
Expand Down

0 comments on commit e5a4d37

Please sign in to comment.