SPIGOT-6304: Removed the detection of legacy text based on color codesApparently there are items and plugins out there that still use legacy
color codes within text components, and which thereby break this
heuristic.
Our remaining approach to differentiate between legacy (plain) and
modern (JSON-based) text is to check if a particular text can be parsed
as JSON-based text. This approach is not perfect either as there are
ambiguous cases that it cannot resolve co...
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 contai...
#707, SPIGOT-5063, SPIGOT-5304, SPIGOT-5656, SPIGOT-3206, SPIGOT-5350, SPIGOT-5980, SPIGOT-4672: Persist the exact internal text representation where possible.Issues resolved by this:
* SPIGOT-5063: Internal text representation of ItemStacks changes during ItemStack serialization. This issue was initially primarily concerned with the conversion between color text attributes to legacy color codes.
* SPIGOT-5304: Internal text representation of ItemStacks changes when opening the inventory (in creative mode). In particularly, this issue is also concern...
#770: Send messages without sender with SYSTEM type againThis was the behaviour before the 1.16 update and made it so that any
message sent by a plugin was treated as a system message allowing the
player to disable chat messages while keeping access to commands.
After 1.16 disabling the chat also disabled any plugin output, this
restores the original behaviour.
SPIGOT-6205: Rewrite enum to/from NMS type methodsThe methods would otherwise cache wrong enum types for specific enums.
This would result in a `ClassCastException` at the caller location,
which obviously is no fun. This broke API with `Switch#getFace` and
`FaceAttachable#getAttachedFace`.
The existing implementation was also stupid.
Rename Chunk "BukkitValues" key to "ChunkBukkitValues"This will discard extra data increasing the size of the chunk from users affected by the bug in the previous commits.
The impact of this (affecting all users) is likely to be much higher than users with plugins relying on an API introduced within the last 12 hours.
SPIGOT-6194: Read correct nbt compound into chunk pdcPreviously spigots chunk pdc loading logic would read the entire chunk
nbt compound into the persistent data container of the chunk instead of
just reading the "BukkitValues".
Furthermore this commit also now correctly checks if the nbt compounds
of entities, tile entities and chunks actually have a value for the
"BukkitValues" key, as the previous 'getCompound' call would always
return an ins...