Paper
Paper copied to clipboard
Join / quit messages are not translated by GlobalTranslator in the server log
Expected behavior
GlobalTranslator should translate TranslatableComponent of join & quit messages when they are printed to the server log
Observed/Actual behavior
GlobalTranslator does not translate TranslatableComponent of join & quit messages when they are printed to the server log
Steps/models to reproduce
- On PlayerJoinEvent or PlayerQuitEvent, set the join or quit message to a TranslatableComponent of a specific key
- Add a custom translator that translates the given key to some text message to the GlobalTranslator
- Join or quit the server and check the server log
Plugin and Datapack List
KabanSMP (the plugin used to reproduce the issue) Geyser-Spigot (dependency) Floodgate (dependency) ProtocolLib (dependency)
Paper version
This server is running Paper version git-Paper-430 (MC: 1.20.4) (Implementing API version 1.20.4-R0.1-SNAPSHOT) (Git: 4939f87)
Other
No response
Confirmed. Currently, the custom flattener that is used to flatten translatable components into strings (for the ansi, plain text, and legacy serializers) only uses instances of Translator that are TranslationRegistry because adventure doesn't have a way to know if a specific Translator will handle a specific key.
I'm not in a huge rush to change this. If you could just use a TranslationRegistry... it would not happen.