From 31f57a86a63eb08ab3c63ede6f3206c28fc77c8c Mon Sep 17 00:00:00 2001 From: Jake Potrebic Date: Wed, 6 Oct 2021 01:05:39 -0700 Subject: [PATCH] Update adventure and fix command perm serialization NPE (#6729) --- patches/api/Adventure.patch | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/patches/api/Adventure.patch b/patches/api/Adventure.patch index 81d400a1de..74222d7c8b 100644 --- a/patches/api/Adventure.patch +++ b/patches/api/Adventure.patch @@ -14,7 +14,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 withJavadocJar() } -+val adventureVersion = "4.9.1" ++val adventureVersion = "4.9.2" +val apiAndDocs by configurations.creating { + attributes { + attribute(Category.CATEGORY_ATTRIBUTE, objects.named(Category.DOCUMENTATION)) @@ -1258,7 +1258,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + @Deprecated // Paper public String getPermissionMessage() { - return permissionMessage; -+ return io.papermc.paper.text.PaperComponents.legacySectionSerializer().serialize(permissionMessage); // Paper ++ return io.papermc.paper.text.PaperComponents.legacySectionSerializer().serializeOrNull(permissionMessage); // Paper } /** @@ -1281,10 +1281,20 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 return this; } + // Paper start ++ /** ++ * Gets the permission message. ++ * ++ * @return the permission message ++ */ + public @Nullable net.kyori.adventure.text.Component permissionMessage() { + return this.permissionMessage; + } + ++ /** ++ * Sets the permission message. ++ * ++ * @param permissionMessage the permission message ++ */ + public void permissionMessage(@Nullable net.kyori.adventure.text.Component permissionMessage) { + this.permissionMessage = permissionMessage; + }