geforkt von SteamWar/BungeeCore
Fix TablistManager
Fix ListCommand
Dieser Commit ist enthalten in:
Ursprung
29b2aee2f1
Commit
d06a0a9c12
src/de/steamwar/bungeecore
@ -64,10 +64,11 @@ public class ListCommand extends BasicCommand {
|
||||
public void execute(CommandSender commandSender, String[] strings) {
|
||||
TreeMap<String, List<ProxiedPlayer>> playerMap = getCustomTablist();
|
||||
for (String server : playerMap.navigableKeySet()) {
|
||||
String serverName = server;
|
||||
if (server.equals("Bau")) {
|
||||
server = Message.parse("TABLIST_BAU", commandSender);
|
||||
serverName = Message.parse("TABLIST_BAU", commandSender);
|
||||
}
|
||||
Message.send("LIST_COMMAND", commandSender, server, playerMap.get(server).stream().map(CommandSender::getName).collect(Collectors.joining(", ")));
|
||||
Message.send("LIST_COMMAND", commandSender, serverName, playerMap.get(server).stream().map(CommandSender::getName).collect(Collectors.joining(", ")));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -213,21 +213,25 @@ public class TablistManager extends BasicListener {
|
||||
public void print(Tablist viewer, boolean slim) {
|
||||
for (int i = 0; i < subTablists.size(); i++) {
|
||||
TablistPart tPart = subTablists.get(i);
|
||||
String name = tPart.name();
|
||||
if (name.equals("Bau")) {
|
||||
name = Message.parse("TABLIST_BAU", viewer.player);
|
||||
}
|
||||
boolean withoutFooter = i == subTablists.size() - 1;
|
||||
if (withHeaders) {
|
||||
if (slim) {
|
||||
int slimSize = tPart.slimSize(viewer.player);
|
||||
int size = tPart.size();
|
||||
if (size == slimSize) {
|
||||
viewer.setSlot(gray, "§7§l" + tPart.name(), 1000);
|
||||
viewer.setSlot(gray, "§7§l" + name, 1000);
|
||||
} else if (slimSize == 0) {
|
||||
viewer.setSlot(gray, "§7§l" + tPart.name() + " §8(§7" + size + "§8)", 1000);
|
||||
viewer.setSlot(gray, "§7§l" + name + " §8(§7" + size + "§8)", 1000);
|
||||
withoutFooter = true;
|
||||
} else {
|
||||
viewer.setSlot(gray, "§7§l" + tPart.name() + " §8(§7+" + (size - slimSize) + "§8)", 1000);
|
||||
viewer.setSlot(gray, "§7§l" + name + " §8(§7+" + (size - slimSize) + "§8)", 1000);
|
||||
}
|
||||
} else {
|
||||
viewer.setSlot(gray, "§7§l" + tPart.name(), 1000);
|
||||
viewer.setSlot(gray, "§7§l" + name, 1000);
|
||||
}
|
||||
}
|
||||
tPart.print(viewer, slim);
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren