Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Let FastBoard handle sidebar line length on legacy #1481

Merged
merged 1 commit into from
Jan 18, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading