From e8105f4a1cb6600fa4ff6c7401b2231fb9901ef8 Mon Sep 17 00:00:00 2001 From: LemonCaramel Date: Fri, 24 Mar 2023 10:25:01 +0900 Subject: [PATCH] fix(serializer-gson): translatable component fallback serializes twice --- .../text/serializer/gson/ComponentSerializerImpl.java | 5 ----- 1 file changed, 5 deletions(-) diff --git a/text-serializer-gson/src/main/java/net/kyori/adventure/text/serializer/gson/ComponentSerializerImpl.java b/text-serializer-gson/src/main/java/net/kyori/adventure/text/serializer/gson/ComponentSerializerImpl.java index e938a1a3e..88a1d0ca3 100644 --- a/text-serializer-gson/src/main/java/net/kyori/adventure/text/serializer/gson/ComponentSerializerImpl.java +++ b/text-serializer-gson/src/main/java/net/kyori/adventure/text/serializer/gson/ComponentSerializerImpl.java @@ -58,7 +58,6 @@ final class ComponentSerializerImpl extends TypeAdapter { static final String TRANSLATE = "translate"; static final String TRANSLATE_FALLBACK = "fallback"; static final String TRANSLATE_WITH = "with"; - static final String FALLBACK = "fallback"; static final String SCORE = "score"; static final String SCORE_NAME = "name"; static final String SCORE_OBJECTIVE = "objective"; @@ -275,10 +274,6 @@ public void write(final JsonWriter out, final Component value) throws IOExceptio out.name(TRANSLATE_WITH); this.gson.toJson(translatable.args(), COMPONENT_LIST_TYPE, out); } - if (translatable.fallback() != null) { - out.name(FALLBACK); - out.value(translatable.fallback()); - } } else if (value instanceof ScoreComponent) { final ScoreComponent score = (ScoreComponent) value; out.name(SCORE);