From af1090259a358f31299b2890d98aafa71fa6958c Mon Sep 17 00:00:00 2001 From: Bjarne Koll Date: Fri, 22 Sep 2023 15:19:33 +0200 Subject: [PATCH] Fix PaperAdvancementDisplay --- patches/server/0658-Add-more-advancement-API.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/patches/server/0658-Add-more-advancement-API.patch b/patches/server/0658-Add-more-advancement-API.patch index 3777b6bc23..0def40b23f 100644 --- a/patches/server/0658-Add-more-advancement-API.patch +++ b/patches/server/0658-Add-more-advancement-API.patch @@ -10,7 +10,7 @@ Co-authored-by: Jake Potrebic diff --git a/src/main/java/io/papermc/paper/advancement/PaperAdvancementDisplay.java b/src/main/java/io/papermc/paper/advancement/PaperAdvancementDisplay.java new file mode 100644 -index 0000000000000000000000000000000000000000..b9c24b8d83b96d8c66cdf879650027f40eafb274 +index 0000000000000000000000000000000000000000..1705f65d897114dd0813f6d366124cefafcb450e --- /dev/null +++ b/src/main/java/io/papermc/paper/advancement/PaperAdvancementDisplay.java @@ -0,0 +1,69 @@ @@ -72,7 +72,7 @@ index 0000000000000000000000000000000000000000..b9c24b8d83b96d8c66cdf879650027f4 + + @Override + public @NotNull Component displayName() { -+ return PaperAdventure.asAdventure(Advancement.constructDisplayComponent(null, this.handle)); ++ return PaperAdventure.asAdventure(Advancement.decorateName(java.util.Objects.requireNonNull(this.handle, "cannot build display name for null handle, invalid state"))); + } + + public static @NotNull Frame asPaperFrame(@NotNull FrameType frameType) {