Closed CrazyDev05 closed 8 months ago
Thanks for the PR! Unfortunately, this is not possible to merge since it introduces a breaking change in the behavior of the displays' constructor (title and description are meant to be only legacy texts).
We discussed the possibility of adding better support for special components (like translatable components) in the 3.0.0 version. We decided that displays will use BaseComponents by default and the NMS wrappers will have two constructors, one accepting a BaseComponent and the other a JSON string (to better support libraries like Adventure).
We also discussed the possibility to add a separate module with adapters for Adventure components and we concluded this is not a priority for us at the moment. If you'd like to discuss this further with us, please join our discord and open a post in help-developing
(especially if you'd like to make a PR for it).
P.S.: We cannot add support for Adventure directly inside the main modules since we support Spigot and we wouldn't like to always request the presence of Adventure on Spigot servers.
while this does change the internal behavior it shouldn't be a breaking change as it accepts both a string and a json serialized component
This PR switches to CraftChatMessage.fromJSONOrString for parsing the advancment display title/description to allow usage of json serialized components. For example this would be a valid title:
{"extra":[{"color":"dark_aqua","text":"Adapt"},"\n",{"color":"#1C6A73","translate":"item.minecraft.diamond"}],"text":""}