From 2519c354ccc2fd559e9abadd2749cc1cf19cf3fd Mon Sep 17 00:00:00 2001 From: "BT (calcastor/mame)" <43831917+calcastor@users.noreply.github.com> Date: Thu, 16 Jan 2025 22:39:41 -0800 Subject: [PATCH] Let FastBoard handle sidebar line length on legacy Signed-off-by: BT (calcastor/mame) <43831917+calcastor@users.noreply.github.com> --- .../main/java/tc/oc/pgm/scoreboard/SidebarMatchModule.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/tc/oc/pgm/scoreboard/SidebarMatchModule.java b/core/src/main/java/tc/oc/pgm/scoreboard/SidebarMatchModule.java index b3c8156e2a..32659f9226 100644 --- a/core/src/main/java/tc/oc/pgm/scoreboard/SidebarMatchModule.java +++ b/core/src/main/java/tc/oc/pgm/scoreboard/SidebarMatchModule.java @@ -55,6 +55,7 @@ import tc.oc.pgm.util.bukkit.ViaUtils; import tc.oc.pgm.util.concurrent.RateLimiter; import tc.oc.pgm.util.event.player.PlayerLocaleChangeEvent; +import tc.oc.pgm.util.platform.Platform; @ListenerScope(MatchScope.LOADED) public class SidebarMatchModule implements MatchModule, Listener { @@ -97,7 +98,9 @@ private FastBoard addSidebar(MatchPlayer player) { FastBoard sidebar = new FastBoard(player.getBukkit()) { @Override public boolean hasLinesMaxLength() { - return player.getProtocolVersion() < ViaUtils.VERSION_1_13; + return (Platform.isModern()) + ? player.getProtocolVersion() < ViaUtils.VERSION_1_13 + : super.hasLinesMaxLength(); } }; // Only render the title once, since it does not change during the match.