From edb4be1e28acffc345efa65e5e9cce10d6ba6ae3 Mon Sep 17 00:00:00 2001 From: LemonCaramel Date: Sat, 5 Jun 2021 16:49:04 +0900 Subject: [PATCH] Fix Cannot be adventure component serialized when the legacy component is null (#5754) --- Spigot-Server-Patches/Adventure.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Spigot-Server-Patches/Adventure.patch b/Spigot-Server-Patches/Adventure.patch index c666473685..937c8d69a4 100644 --- a/Spigot-Server-Patches/Adventure.patch +++ b/Spigot-Server-Patches/Adventure.patch @@ -606,7 +606,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + // Component + + public static Component asAdventure(final IChatBaseComponent component) { -+ return GSON.serializer().fromJson(IChatBaseComponent.ChatSerializer.toJsonTree(component), Component.class); ++ return component == null ? Component.empty() : GSON.serializer().fromJson(IChatBaseComponent.ChatSerializer.toJsonTree(component), Component.class); + } + + public static ArrayList asAdventure(final List vanillas) {