diff --git a/api/src/main/java/net/md_5/bungee/api/chat/BaseComponent.java b/api/src/main/java/net/md_5/bungee/api/chat/BaseComponent.java index a0436cce..936e6867 100644 --- a/api/src/main/java/net/md_5/bungee/api/chat/BaseComponent.java +++ b/api/src/main/java/net/md_5/bungee/api/chat/BaseComponent.java @@ -323,8 +323,7 @@ public abstract class BaseComponent return color != null || bold != null || italic != null || underlined != null || strikethrough != null || obfuscated != null - || hoverEvent != null || clickEvent != null - || (extra != null && extra.size() > 0); + || hoverEvent != null || clickEvent != null; } /** diff --git a/api/src/main/java/net/md_5/bungee/chat/TextComponentSerializer.java b/api/src/main/java/net/md_5/bungee/chat/TextComponentSerializer.java index 4fc19984..d5a7c5fb 100644 --- a/api/src/main/java/net/md_5/bungee/chat/TextComponentSerializer.java +++ b/api/src/main/java/net/md_5/bungee/chat/TextComponentSerializer.java @@ -8,9 +8,11 @@ import com.google.gson.JsonParseException; import com.google.gson.JsonPrimitive; import com.google.gson.JsonSerializationContext; import com.google.gson.JsonSerializer; +import net.md_5.bungee.api.chat.BaseComponent; import net.md_5.bungee.api.chat.TextComponent; import java.lang.reflect.Type; +import java.util.List; public class TextComponentSerializer extends BaseComponentSerializer implements JsonSerializer, JsonDeserializer { @@ -28,7 +30,8 @@ public class TextComponentSerializer extends BaseComponentSerializer implements @Override public JsonElement serialize(TextComponent src, Type typeOfSrc, JsonSerializationContext context) { - if ( !src.hasFormatting() ) + List extra = src.getExtra(); + if ( !src.hasFormatting() && (extra == null || extra.size() > 0) ) { return new JsonPrimitive( src.getText() ); }