Use translation key as text if not found

This commit is contained in:
Nassim Jahnke 2022-07-28 13:43:08 +02:00
parent 322af00e80
commit 0c39723d1a
No known key found for this signature in database
GPG Key ID: 6BE3B555EBC5982B

View File

@ -283,10 +283,9 @@ public final class Protocol1_19_1To1_19 extends AbstractProtocol<ClientboundPack
}
final String translationKey = (String) decoaration.get("translation_key").getValue();
final String rawTranslation = Via.getConfig().chatTypeFormat(translationKey);
String rawTranslation = Via.getConfig().chatTypeFormat(translationKey);
if (rawTranslation == null) {
Via.getPlatform().getLogger().warning("Missing chat type translation for key " + translationKey);
return false;
rawTranslation = translationKey;
}
Component component = Component.text(rawTranslation);