Skip to content
Failed

Changes

Summary

  1. #3490: Add ComponentBuilder#build() and ComponentSerializer#deserialize() (commit: cfe00fa) (details)
Commit cfe00fa47c19e71e191c2651deb61239d68ed18b by github
#3490: Add ComponentBuilder#build() and ComponentSerializer#deserialize()

Components traditionally use the extra data to represent components as a single BaseComponent object. While BaseComponent typically mirrors this behaviour, somewhere along the development of BungeeChat this practice was made unclear. Because ComponentBuilder#create() returns an array of BaseComponents, it has sort of been silently accepted that all components should be represented as arrays, which is incorrect. This heavily influenced the direction of Spigot's component API (with additions such as CommandSender#sendMessage(BaseComponent[])) which emphasizes this misconception of "all components are arrays".

Adding new methods to ComponentBuilder and ComponentSerializer should steer use of the BungeeChat API to be more oriented towards single component instances, not arrays.
(commit: cfe00fa)
The file was modifiedchat/src/main/java/net/md_5/bungee/api/chat/ComponentBuilder.java (diff)
The file was modifiedchat/src/main/java/net/md_5/bungee/api/chat/hover/content/Text.java (diff)
The file was modifiedchat/src/main/java/net/md_5/bungee/chat/ComponentSerializer.java (diff)
The file was modifiedchat/src/test/java/net/md_5/bungee/api/chat/ComponentsTest.java (diff)