Skip to content
Success

Changes

Summary

  1. SPIGOT-6303: Interpret text that Gson considers to be an empty JSON (details)
Commit 24c79a14463b6ff00adf63098566dc84588f8fd9 by md_5
SPIGOT-6303: Interpret text that Gson considers to be an empty JSON document as legacy text.

For example, this affects empty Strings, and Strings that consist only
of whitespace. In lenient mode this would also affect text that contains
comments, but that is not the case currently.
Minecraft's component parser (i.e. Gson) produces null for these texts
instead of throwing a parse exception. By interpreting this text as
legacy text we correctly create text components for them that contain
their contents.
The file was modified src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java