geforkt von SteamWar/BungeeCore
Add better Tablist Slim behaviour
Dieser Commit ist enthalten in:
Ursprung
75b823f780
Commit
1087cdb74c
@ -212,7 +212,19 @@ public class TablistManager extends BasicListener {
|
|||||||
public void print(Tablist viewer, boolean slim) {
|
public void print(Tablist viewer, boolean slim) {
|
||||||
subTablists.forEach(tPart -> {
|
subTablists.forEach(tPart -> {
|
||||||
if(withHeaders)
|
if(withHeaders)
|
||||||
viewer.setSlot(gray, "§7§l" + tPart.name(), 1000);
|
if (slim) {
|
||||||
|
int slimSize = tPart.slimSize(viewer.player);
|
||||||
|
int size = tPart.size();
|
||||||
|
if (size == slimSize) {
|
||||||
|
viewer.setSlot(gray, "§7§l" + tPart.name(), 1000);
|
||||||
|
} else if (slimSize == 0) {
|
||||||
|
viewer.setSlot(gray, "§7§l" + tPart.name() + " §8(§7" + size + "§8)", 1000);
|
||||||
|
} else {
|
||||||
|
viewer.setSlot(gray, "§7§l" + tPart.name() + " §8(§7+" + (size - slimSize) + "§8)", 1000);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
viewer.setSlot(gray, "§7§l" + tPart.name(), 1000);
|
||||||
|
}
|
||||||
tPart.print(viewer, slim);
|
tPart.print(viewer, slim);
|
||||||
if(withHeaders)
|
if(withHeaders)
|
||||||
viewer.setSlot(darkGray, "", 1000);
|
viewer.setSlot(darkGray, "", 1000);
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren