Hover event text does not support translatable components
Expected behavior
Hover events do not appear to support translatable components.
// text.foo = "foo"
Component.translatable("text.foo")
.hoverEvent(HoverEvent.hoverEvent(HoverEvent.Action.SHOW_TEXT,
Component.translatable("text.foo")))
The translation was registered with the store:
final var store = MiniMessageTranslationStore.create(Key.key("mynamespace:mykey"));
store.register("text.foo", "foo");
GlobalTranslator.translator().addSource(store);
Paper 1.21.5
Observed/Actual behavior
The code produces "foo" when sent to a player, but "text.foo" when hovered.
Steps/models to reproduce
Use the code above.
Plugin and Datapack List
? Server Plugins (4): Bukkit Plugins:
- LuckPerms, NBTAPI, prism, WorldEdit
There are 3 data pack(s) enabled: [vanilla (built-in)], [file/bukkit (world)], [paper (built-in)]
Paper version
1.21.5-76-main@04ffca0 (2025-05-09T15:38:33Z) (Implementing API version 1.21.5-R0.1-SNAPSHOT)
Other
No response
If the same issue is present when you run the component through the translator manually you should open this issue on Adventure.
I don't follow. How would I do this manually? It's specifically in the hover event that this fails.
Unable to reproduce on 1.21.10