Closed flerouwu closed 2 months ago
ExcellentEnchants is built under Spigot. This is not possible currently to use Translation Components in item's lore. We're waiting for Spigot API changes that allows doing that.
The link that I specified above (https://docs.advntr.dev/platform/bukkit.html) shows how you are able to implement Adventure on Bukkit.
I already have my own implementation done and awaiting for the Spigot API updates that allows to use it without NMS. Not gonna depend on adventure.
Not a thing for 1.21+ anymore (fixed by the game itself).
Issue
ExcellentEnchants manually maps the enchantment level to the corresponding roman numeral, without using the client's translations. This leads to issues where players wish to use different translations for the associated enchantment level.
Additionally, I am attempting to use this plugin on a server with a custom resource pack that changes the enchantment levels to custom unicode characters that are then mapped to custom textures.
For an example, see the screenshot below.
Solution
This can be solved by instead using translation keys for the enchantment level. These keys are
enchantment.level.<level>
(e.g.enchantment.level.3
).While I'm unsure if the Bukkit API has a way of doing this, you can achieve this with either raw JSON tags or via Adventure.
Adventure Component API
While Adventure has first-class support for Paper, the documentation lists ways to incorporate the API on a Bukkit / Spigot server here.
Raw JSON
I'm unsure if you can send custom JSON for item names via Bukkit. The Adventure APIs would probably be a better choice.
extra[0].fallback
can be replaced with the current roman numeral system, to be used as a fallback if the translation key doesn't exist.