Skip to content

Commit

Permalink
Let FastBoard handle sidebar line length on legacy (#1481)
Browse files Browse the repository at this point in the history
Signed-off-by: BT (calcastor/mame) <[email protected]>
  • Loading branch information
calcastor authored Jan 18, 2025
1 parent a84e89f commit d11c2c6
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit d11c2c6

Please sign in to comment.