Paper icon indicating copy to clipboard operation
Paper copied to clipboard

Join / quit messages are not translated by GlobalTranslator in the server log

Open KabanFriends opened this issue 1 year ago • 1 comments

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

  1. On PlayerJoinEvent or PlayerQuitEvent, set the join or quit message to a TranslatableComponent of a specific key
  2. Add a custom translator that translates the given key to some text message to the GlobalTranslator
  3. 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

KabanFriends avatar Feb 24 '24 07:02 KabanFriends

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.

Machine-Maker avatar Mar 04 '24 06:03 Machine-Maker