From 727e71ad0f5b6047ef93d83ece8dc13654202331 Mon Sep 17 00:00:00 2001
From: Riley Park <rileysebastianpark@gmail.com>
Date: Sun, 14 Mar 2021 12:04:49 -0700
Subject: [PATCH] bug #5362 - correctly pass "render type" when registering a
 new scoreboard objective

fixes #5362
---
 Spigot-Server-Patches/Adventure.patch                           | 2 +-
 .../Lazily-track-plugin-scoreboards-by-default.patch            | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Spigot-Server-Patches/Adventure.patch b/Spigot-Server-Patches/Adventure.patch
index f5fac57c04..563aa8480e 100644
--- a/Spigot-Server-Patches/Adventure.patch
+++ b/Spigot-Server-Patches/Adventure.patch
@@ -3075,7 +3075,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
          ScoreboardObjective objective = board.registerObjective(name, craftCriteria.criteria, CraftChatMessage.fromStringOrNull(displayName), CraftScoreboardTranslations.fromBukkitRender(renderType));
 -        return new CraftObjective(this, objective);
 +        return new CraftObjective(this, objective);*/ // Paper
-+        return registerNewObjective(name, criteria, io.papermc.paper.adventure.PaperAdventure.LEGACY_SECTION_UXRC.deserialize(displayName)); // Paper
++        return registerNewObjective(name, criteria, io.papermc.paper.adventure.PaperAdventure.LEGACY_SECTION_UXRC.deserialize(displayName), renderType); // Paper
      }
  
      @Override
diff --git a/Spigot-Server-Patches/Lazily-track-plugin-scoreboards-by-default.patch b/Spigot-Server-Patches/Lazily-track-plugin-scoreboards-by-default.patch
index fe177728c5..3e53804831 100644
--- a/Spigot-Server-Patches/Lazily-track-plugin-scoreboards-by-default.patch
+++ b/Spigot-Server-Patches/Lazily-track-plugin-scoreboards-by-default.patch
@@ -51,7 +51,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
 +        // Paper end
          ScoreboardObjective objective = board.registerObjective(name, craftCriteria.criteria, CraftChatMessage.fromStringOrNull(displayName), CraftScoreboardTranslations.fromBukkitRender(renderType));
          return new CraftObjective(this, objective);*/ // Paper
-         return registerNewObjective(name, criteria, io.papermc.paper.adventure.PaperAdventure.LEGACY_SECTION_UXRC.deserialize(displayName)); // Paper
+         return registerNewObjective(name, criteria, io.papermc.paper.adventure.PaperAdventure.LEGACY_SECTION_UXRC.deserialize(displayName), renderType); // Paper
 diff --git a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardManager.java b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardManager.java
 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
 --- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardManager.java