From 02883f2beae6a0b75ad2ad4ef86e55d6f0451569 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Wed, 22 Dec 2021 11:29:43 +0100 Subject: [PATCH] Update TablistManager --- .../bungeecore/listeners/TablistManager.java | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/de/steamwar/bungeecore/listeners/TablistManager.java b/src/de/steamwar/bungeecore/listeners/TablistManager.java index 797471d..4ef84d7 100644 --- a/src/de/steamwar/bungeecore/listeners/TablistManager.java +++ b/src/de/steamwar/bungeecore/listeners/TablistManager.java @@ -203,18 +203,13 @@ public class TablistManager extends BasicListener { boolean removeFooter = i == subTablists.size() - 1; if (viewer == null) { size += tablistPart.size(); - if (withHeaders) size += 2; // The 2 is for the header and footer - if (removeFooter) size--; // The last one has no footer } else { int slimSize = tablistPart.slimSize(viewer); - if (slimSize == 0) { - if (withHeaders) size++; // This increment is just for the header - } else { - size += slimSize; - if (withHeaders) size += 2; // The 2 is for the header and footer - if (removeFooter) size--; // The last one has no footer - } + size += slimSize; + if (slimSize == 0) removeFooter = true; } + if (withHeaders) size += 2; // The 2 is for the header and footer + if (removeFooter) size--; // The last one has no footer } return size; }