diff --git a/src/de/steamwar/bungeecore/commands/ListCommand.java b/src/de/steamwar/bungeecore/commands/ListCommand.java index cb2de64..631f408 100644 --- a/src/de/steamwar/bungeecore/commands/ListCommand.java +++ b/src/de/steamwar/bungeecore/commands/ListCommand.java @@ -64,10 +64,11 @@ public class ListCommand extends BasicCommand { public void execute(CommandSender commandSender, String[] strings) { TreeMap> 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(", "))); } } } diff --git a/src/de/steamwar/bungeecore/listeners/TablistManager.java b/src/de/steamwar/bungeecore/listeners/TablistManager.java index a2f167d..b7dd44b 100644 --- a/src/de/steamwar/bungeecore/listeners/TablistManager.java +++ b/src/de/steamwar/bungeecore/listeners/TablistManager.java @@ -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);