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

Event scoreUpdated is not called #3620

Open
1 task done
XxGoldenbluexX opened this issue Mar 24, 2025 · 1 comment
Open
1 task done

Event scoreUpdated is not called #3620

XxGoldenbluexX opened this issue Mar 24, 2025 · 1 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

Comments

@XxGoldenbluexX
Copy link

XxGoldenbluexX commented Mar 24, 2025

  • The FAQ doesn't contain a resolution to my issue

Versions

  • mineflayer: 4.26.0
  • server: Paper with 1.21.4-211-main@6ea4202 for Minecraft 1.21.4
  • node: bun 1.2.5

Detailed description of a problem

The event "scoreUpdated" is not called

What did you try yet?

  • Tried with plugin/custom scoreboard objectives
  • Tried with vanilla screboard
  • using bot._client.on("scoreboard_score", myCustomHandler) => It works

Your current code

/*
Too long to be posted here, however a snippet could be this one 
*/

bot.on("scoreUpdated", (scoreboard,item) => console.log(scoreboard))

Expected behavior

The event should be called

Additional context

I found the issue:
In "scoreboard.js" line 43, packet.action is undefined, hence why "the bot.emit('scoreUpdated', scoreboard, updated)" is never called.
The action field inside the packet is not sent anymore since 1.20.3

@XxGoldenbluexX XxGoldenbluexX 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 Mar 24, 2025
@XxGoldenbluexX XxGoldenbluexX changed the title scoreUpdated is not called Event scoreUpdated is not called Mar 24, 2025
@XxGoldenbluexX
Copy link
Author

XxGoldenbluexX commented Mar 24, 2025

I can maybe try to make a PR myself.
How is managed this kind of cases which depends on the minecraft/protocol version?
=> Found if (bot.registry.version['>=']('1.21.3')) in physics.js line 367, that migh be it

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

1 participant