[ ] The FAQ doesn't contain a resolution to my issue
Versions
mineflayer: #.#.#
server: vanilla #.#.#
node: #.#.#
Detailed description of a problem
A clear and concise description of what the problem is, with as much context as possible.
What are you building? What problem are you trying to solve?
What did you try yet?
Did you try any method from the API?
Did you try any example? Any error from those?
Your current code
const mineflayer = require('mineflayer')
const bot = mineflayer.createBot({
host: 'UnsafeTest.aternos.me', // optional
username: 'Dimas_notgames', // E-mail и пароль используются для
version: '1.18.2' // При установленном значении false версия будет выбрана автоматически, используйте пример выше чтобы выбрать нужную версию
})
bot.on('chat', function (username, message) {
if (message == 'Start plugin'){
PS()
}
// Прослушивание ошибок и причин отключения от сервера:
bot.on('kicked', (reason, loggedIn) => console.log(reason, loggedIn))
bot.on('error', err => console.log(err))
## Expected behavior
A clear and concise description of what you expected to happen.
## Additional context
Add any other context about the problem here.
Versions
Detailed description of a problem
A clear and concise description of what the problem is, with as much context as possible. What are you building? What problem are you trying to solve?
What did you try yet?
Did you try any method from the API? Did you try any example? Any error from those?
Your current code
const mineflayer = require('mineflayer')
const bot = mineflayer.createBot({ host: 'UnsafeTest.aternos.me', // optional username: 'Dimas_notgames', // E-mail и пароль используются для version: '1.18.2' // При установленном значении false версия будет выбрана автоматически, используйте пример выше чтобы выбрать нужную версию })
bot.on('chat', function (username, message) { if (message == 'Start plugin'){ PS() }
})
function PS(){ bot.chat('/advancement grant Dimas_notgames everything') bot.chat('/gamemode survival @a') bot.chat('/gamemode spectator Dimas_notgames') bot.chat('/locate #minecraft:village') bot.on('locate', (teleport)) //bot.chat('/tp @a ' + location) }
// Прослушивание ошибок и причин отключения от сервера: bot.on('kicked', (reason, loggedIn) => console.log(reason, loggedIn)) bot.on('error', err => console.log(err))