Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

entityHurt event is not working #3253

Closed
jonvicbarcenas opened this issue Dec 25, 2023 · 4 comments
Closed

entityHurt event is not working #3253

jonvicbarcenas opened this issue Dec 25, 2023 · 4 comments
Labels
possible bug Stage1 just created by someone new to the project, we don't know yet if it deserves an implementation / a f

Comments

@jonvicbarcenas
Copy link

This part of the code is not workinf

bot.on('entityHurt', (entity) => {
if (entity.type === 'mob') {
bot.chat(Haha! The ${entity.mobType} got hurt!)
} else if (entity.type === 'player') {
bot.chat(Aww, poor ${entity.username} got hurt. Maybe you shouldn't have a ping of ${bot.players[entity.username].ping})
}
})

@jonvicbarcenas jonvicbarcenas added possible bug Stage1 just created by someone new to the project, we don't know yet if it deserves an implementation / a f labels Dec 25, 2023
@amoraschi
Copy link
Contributor

Hard to give support without you filling the issue form

@jonvicbarcenas
Copy link
Author

it only works if i have torch left hand

@rom1504
Copy link
Member

rom1504 commented Dec 31, 2023

this is happening here

if (eventName) bot.emit(eventName, entity)

add some prints there / enable debug mode and fix it, then open a PR

@rom1504
Copy link
Member

rom1504 commented Dec 31, 2023

#3184 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
possible bug Stage1 just created by someone new to the project, we don't know yet if it deserves an implementation / a f
Projects
None yet
Development

No branches or pull requests

3 participants