SteamWar/BungeeCore
Archiviert
13
2

Update TablistManager
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
yoyosource 2021-12-22 11:29:43 +01:00
Ursprung adbf041135
Commit 02883f2bea

Datei anzeigen

@ -203,18 +203,13 @@ public class TablistManager extends BasicListener {
boolean removeFooter = i == subTablists.size() - 1; boolean removeFooter = i == subTablists.size() - 1;
if (viewer == null) { if (viewer == null) {
size += tablistPart.size(); 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 { } else {
int slimSize = tablistPart.slimSize(viewer); int slimSize = tablistPart.slimSize(viewer);
if (slimSize == 0) { size += slimSize;
if (withHeaders) size++; // This increment is just for the header if (slimSize == 0) removeFooter = true;
} else {
size += slimSize;
if (withHeaders) size += 2; // The 2 is for the header and footer
if (removeFooter) size--; // The last one has no footer
}
} }
if (withHeaders) size += 2; // The 2 is for the header and footer
if (removeFooter) size--; // The last one has no footer
} }
return size; return size;
} }