diff --git a/patches/api/Adventure.patch b/patches/api/Adventure.patch index da5eb72563..2eb7a790e0 100644 --- a/patches/api/Adventure.patch +++ b/patches/api/Adventure.patch @@ -3993,7 +3993,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + * @param displayName Name displayed to players for the Objective. + * @return The registered Objective + * @throws IllegalArgumentException if name is null -+ * @throws IllegalArgumentException if name is longer than 16 ++ * @throws IllegalArgumentException if name is longer than 32767 + * characters. + * @throws IllegalArgumentException if criteria is null + * @throws IllegalArgumentException if displayName is null @@ -4013,7 +4013,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + * @param renderType Manner of rendering the Objective + * @return The registered Objective + * @throws IllegalArgumentException if name is null -+ * @throws IllegalArgumentException if name is longer than 16 ++ * @throws IllegalArgumentException if name is longer than 32767 + * characters. + * @throws IllegalArgumentException if criteria is null + * @throws IllegalArgumentException if displayName is null diff --git a/patches/server/Adventure.patch b/patches/server/Adventure.patch index 8ebb18b12c..07595130e2 100644 --- a/patches/server/Adventure.patch +++ b/patches/server/Adventure.patch @@ -3352,7 +3352,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + Validate.notNull(criteria, "Criteria cannot be null"); + Validate.notNull(displayName, "Display name cannot be null"); + Validate.notNull(renderType, "RenderType cannot be null"); -+ Validate.isTrue(name.length() <= 16, "The name '" + name + "' is longer than the limit of 16 characters"); ++ Validate.isTrue(name.length() <= Short.MAX_VALUE, "The name '" + name + "' is longer than the limit of 32767 characters"); + Validate.isTrue(board.getObjective(name) == null, "An objective of name '" + name + "' already exists"); + CraftCriteria craftCriteria = CraftCriteria.getFromBukkit(criteria); + net.minecraft.world.scores.Objective objective = board.addObjective(name, craftCriteria.criteria, io.papermc.paper.adventure.PaperAdventure.asVanilla(displayName), CraftScoreboardTranslations.fromBukkitRender(renderType)); diff --git a/patches/server/Lazily-track-plugin-scoreboards-by-default.patch b/patches/server/Lazily-track-plugin-scoreboards-by-default.patch index 817052afc2..1337252a6f 100644 --- a/patches/server/Lazily-track-plugin-scoreboards-by-default.patch +++ b/patches/server/Lazily-track-plugin-scoreboards-by-default.patch @@ -42,7 +42,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 CraftScoreboard(Scoreboard board) { this.board = board; @@ -0,0 +0,0 @@ public final class CraftScoreboard implements org.bukkit.scoreboard.Scoreboard { - Validate.isTrue(name.length() <= 16, "The name '" + name + "' is longer than the limit of 16 characters"); + Validate.isTrue(name.length() <= Short.MAX_VALUE, "The name '" + name + "' is longer than the limit of 32767 characters"); Validate.isTrue(board.getObjective(name) == null, "An objective of name '" + name + "' already exists"); CraftCriteria craftCriteria = CraftCriteria.getFromBukkit(criteria); + // Paper start - the block comment from the old registerNewObjective didnt cause a conflict when rebasing, so this block wasn't added to the adventure registerNewObjective