Skip to content

Fix sorting by value in details panel #383

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

Merged
merged 2 commits into from
Aug 16, 2025

Conversation

PapiCapi
Copy link
Contributor

Hello, one of my players informed me that the Details panel wasn't sorting anything when selecting the "value" sort.

It seems that this issue is because :

  • in the BlockConfig, now, most of my blocks are lowercase and are added this way in the map "blockValues".
  • in DetailsPanel, when sorting by value, you were getting in the map with Material (o1.key() and o2.key() are Material) instead of a String.

As a result, I :

  • ensured that the blocks added to the blockValues map are lowercase (because some in my config are also uppercase)
  • converted the Material into a String and forced it to be lowercase because Material.toString() outputs an uppercase String.

Feel free to modify my PR as you like :)

@tastybento tastybento merged commit 3eb0658 into BentoBoxWorld:develop Aug 16, 2025
1 check failed
@tastybento
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants