When merging 2e419805ad, nobody caught the
fact we removed the component serialisation of legacy BungeeCord Chat
API components in the PacketPlayOutTitle class.
Test plugin code:
```kotlin
class LegacyMessageCommand : BaseCommand() {
override fun register(manager: PaperCommandManager<CommandSender>) {
manager.command(manager.commandBuilder("legacymsg")
.sender<Player>()
.handler {
val component = ComponentBuilder("Test")
.color(ChatColor.DARK_RED)
.bold(true)
.append(" message")
.bold(false)
.color(ChatColor.of("#f8a8a8"))
.event(
HoverEvent(
HoverEvent.Action.SHOW_TEXT,
Text(
ComponentBuilder("Test hover")
.color(ChatColor.AQUA)
.underlined(true)
.create()
)
)
)
.event(
ClickEvent(
ClickEvent.Action.SUGGEST_COMMAND,
"/legacymsg"
)
)
.create()
it.sender.sendMessage(*component)
it.sender.sendActionBar(*component)
it.sender.sendTitle(
Title.builder()
.title(component)
.subtitle(component)
.fadeIn(40)
.stay(60)
.fadeOut(40)
.build()
)
})
}
}
```
Fixes GH-5271.
7.7 KiB
7.7 KiB