From 8cbaa6f70f83e659d35ddc71e9d670c187e109a5 Mon Sep 17 00:00:00 2001 From: William278 Date: Fri, 31 Mar 2023 15:09:05 +0100 Subject: [PATCH] Tweak header/footer index incrementation order --- .../java/net/william278/velocitab/player/TabPlayer.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/java/net/william278/velocitab/player/TabPlayer.java b/src/main/java/net/william278/velocitab/player/TabPlayer.java index 649ccce..21f9a24 100644 --- a/src/main/java/net/william278/velocitab/player/TabPlayer.java +++ b/src/main/java/net/william278/velocitab/player/TabPlayer.java @@ -96,11 +96,10 @@ public final class TabPlayer implements Comparable { } public void incrementHeaderIndex(@NotNull Velocitab plugin) { + headerIndex++; if (headerIndex >= plugin.getSettings().getHeaderListSize(getServerGroup(plugin))) { headerIndex = 0; - return; } - headerIndex++; } public int getFooterIndex() { @@ -108,11 +107,10 @@ public final class TabPlayer implements Comparable { } public void incrementFooterIndex(@NotNull Velocitab plugin) { + footerIndex++; if (footerIndex >= plugin.getSettings().getFooterListSize(getServerGroup(plugin))) { footerIndex = 0; - return; } - footerIndex++; } @Override