From ed1b45fccbf23031ce5b91abc971c1bab2d281cb Mon Sep 17 00:00:00 2001 From: ME1312 Date: Mon, 6 Aug 2018 22:39:29 -0400 Subject: [PATCH] Make UI elements consistant --- .../ME1312/SubServers/Bungee/SubPlugin.java | 10 ++++---- .../Bukkit/Graphic/InternalUIHandler.java | 2 +- .../Bukkit/Graphic/InternalUIRenderer.java | 8 +++---- .../Library/Compatibility/BungeeChat.java | 20 +++++++++------- .../SubServers/Client/Bukkit/SubCommand.java | 2 +- .../SubServers/Client/Sponge/SubCommand.java | 23 +++++++++++-------- .../ME1312/SubServers/Host/SubCommand.java | 2 +- .../ME1312/SubServers/Sync/SubCommand.java | 2 +- 8 files changed, 40 insertions(+), 29 deletions(-) diff --git a/SubServers.Bungee/src/net/ME1312/SubServers/Bungee/SubPlugin.java b/SubServers.Bungee/src/net/ME1312/SubServers/Bungee/SubPlugin.java index b1a03b41..1988db50 100644 --- a/SubServers.Bungee/src/net/ME1312/SubServers/Bungee/SubPlugin.java +++ b/SubServers.Bungee/src/net/ME1312/SubServers/Bungee/SubPlugin.java @@ -272,11 +272,13 @@ public final class SubPlugin extends BungeeCord implements Listener { } int proxies = 1; if (redis) { - System.out.println("SubServers > "+((status)?"Rel":"L")+"oading Proxies..."); try { + boolean first = true; String master = (String) redis("getServerId"); for (String name : (List) redis("getAllServers")) { if (!ukeys.contains(name.toLowerCase()) && !master.equals(name)) try { + if (first) System.out.println("SubServers > "+((status)?"Rel":"L")+"oading Proxies..."); + first = false; Proxy proxy = this.proxies.get(name.toLowerCase()); if (proxy == null) { proxy = new Proxy(name); @@ -395,7 +397,7 @@ public final class SubPlugin extends BungeeCord implements Listener { YAMLSection edits = new YAMLSection(); if (config.get().getSection("Servers").getSection(name).getBoolean("Enabled") != server.isEnabled()) edits.set("enabled", config.get().getSection("Servers").getSection(name).getBoolean("Enabled")); - if (config.get().getSection("Servers").getSection(name).getKeys().contains("Display") && ((config.get().getSection("Servers").getSection(name).getString("Display").length() == 0 && !server.getDisplayName().equals(server.getName())) || !config.get().getSection("Servers").getSection(name).getString("Display").equals(server.getDisplayName()))) + if (config.get().getSection("Servers").getSection(name).getKeys().contains("Display") && ((config.get().getSection("Servers").getSection(name).getRawString("Display").length() == 0 && !server.getDisplayName().equals(server.getName())) || !config.get().getSection("Servers").getSection(name).getRawString("Display").equals(server.getDisplayName()))) edits.set("display", config.get().getSection("Servers").getSection(name).getRawString("Display")); if (!config.get().getSection("Servers").getSection(name).getString("Host").equalsIgnoreCase(server.getHost().getName())) edits.set("host", config.get().getSection("Servers").getSection(name).getRawString("Host")); @@ -460,8 +462,8 @@ public final class SubPlugin extends BungeeCord implements Listener { server.setAutoRestart(config.get().getSection("Servers").getSection(name).getBoolean("Auto-Restart")); if (!status && config.get().getSection("Servers").getSection(name).getBoolean("Run-On-Launch")) autorun.add(name.toLowerCase()); - if (config.get().getSection("Servers").getSection(name).getKeys().contains("Display") && ((config.get().getSection("Servers").getSection(name).getString("Display").length() == 0 && !server.getDisplayName().equals(server.getName())) || !config.get().getSection("Servers").getSection(name).getString("Display").equals(server.getDisplayName()))) - server.setDisplayName(config.get().getSection("Servers").getSection(name).getString("Display")); + if (config.get().getSection("Servers").getSection(name).getKeys().contains("Display") && ((config.get().getSection("Servers").getSection(name).getRawString("Display").length() == 0 && !server.getDisplayName().equals(server.getName())) || !config.get().getSection("Servers").getSection(name).getRawString("Display").equals(server.getDisplayName()))) + server.setDisplayName(config.get().getSection("Servers").getSection(name).getRawString("Display")); if (config.get().getSection("Servers").getSection(name).getKeys().contains("Group")) { for (String group : server.getGroups()) server.removeGroup(group); for (String group : config.get().getSection("Servers").getSection(name).getStringList("Group")) server.addGroup(group); diff --git a/SubServers.Client/Bukkit/src/net/ME1312/SubServers/Client/Bukkit/Graphic/InternalUIHandler.java b/SubServers.Client/Bukkit/src/net/ME1312/SubServers/Client/Bukkit/Graphic/InternalUIHandler.java index fe20b2a8..47129de7 100644 --- a/SubServers.Client/Bukkit/src/net/ME1312/SubServers/Client/Bukkit/Graphic/InternalUIHandler.java +++ b/SubServers.Client/Bukkit/src/net/ME1312/SubServers/Client/Bukkit/Graphic/InternalUIHandler.java @@ -275,7 +275,7 @@ public class InternalUIHandler implements UIHandler, Listener { } else if (item.equals(plugin.api.getLang("SubServers", "Interface.Generic.Back"))) { player.closeInventory(); gui.back(); - } else if (!item.equals(ChatColor.RESET.toString()) && !item.equals(plugin.api.getLang("SubServers", "Interface.Server-Menu.No-Servers"))) { + } else if (!item.equals(ChatColor.RESET.toString()) && !item.startsWith(ChatColor.WHITE.toString()) && !item.equals(plugin.api.getLang("SubServers", "Interface.Server-Menu.No-Servers"))) { player.closeInventory(); String obj; if (event.getCurrentItem().getItemMeta().getLore() != null && event.getCurrentItem().getItemMeta().getLore().size() > 0 && event.getCurrentItem().getItemMeta().getLore().get(0).startsWith(ChatColor.GRAY.toString())) { diff --git a/SubServers.Client/Bukkit/src/net/ME1312/SubServers/Client/Bukkit/Graphic/InternalUIRenderer.java b/SubServers.Client/Bukkit/src/net/ME1312/SubServers/Client/Bukkit/Graphic/InternalUIRenderer.java index 99a91837..b2b81e2f 100644 --- a/SubServers.Client/Bukkit/src/net/ME1312/SubServers/Client/Bukkit/Graphic/InternalUIRenderer.java +++ b/SubServers.Client/Bukkit/src/net/ME1312/SubServers/Client/Bukkit/Graphic/InternalUIRenderer.java @@ -857,12 +857,12 @@ public class InternalUIRenderer extends UIRenderer { if (hosts.get(server) == null) { block = createItem("STAINED_GLASS_PANE", external.name(), external.get()); blockMeta = block.getItemMeta(); - blockMeta.setDisplayName(ChatColor.AQUA + json.getSection("servers").getSection(server).getString("display")); + blockMeta.setDisplayName(ChatColor.WHITE + json.getSection("servers").getSection(server).getString("display")); LinkedList lore = new LinkedList(); if (!server.equals(json.getSection("servers").getSection(server).getString("display"))) lore.add(ChatColor.GRAY + server); - lore.add(plugin.api.getLang("SubServers", "Interface.Server-Menu.Server-Player-Count").replace("$int$", new DecimalFormat("#,###").format(json.getSection("servers").getSection(server).getSection("players").getKeys().size()))); lore.add(plugin.api.getLang("SubServers", "Interface.Server-Menu.Server-External")); + lore.add(plugin.api.getLang("SubServers", "Interface.Server-Menu.Server-Player-Count").replace("$int$", new DecimalFormat("#,###").format(json.getSection("servers").getSection(server).getSection("players").getKeys().size()))); lore.add(plugin.api.getLang("SubServers", "Interface.Server-Menu.SubServer-Invalid")); lore.add(ChatColor.WHITE + ((plugin.config.get().getSection("Settings").getBoolean("Show-Addresses", false))?json.getSection("servers").getSection(server).getString("address"):json.getSection("servers").getSection(server).getString("address").split(":")[json.getSection("servers").getSection(server).getString("address").split(":").length - 1])); blockMeta.setLore(lore); @@ -873,8 +873,8 @@ public class InternalUIRenderer extends UIRenderer { LinkedList lore = new LinkedList(); if (!server.equals(json.getSection("hosts").getSection(hosts.get(server)).getSection("servers").getSection(server).getString("display"))) lore.add(ChatColor.GRAY + server); - lore.add(plugin.api.getLang("SubServers", "Interface.Server-Menu.Server-Player-Count").replace("$int$", new DecimalFormat("#,###").format(json.getSection("hosts").getSection(hosts.get(server)).getSection("servers").getSection(server).getSection("players").getKeys().size()))); lore.add(plugin.api.getLang("SubServers", "Interface.Server-Menu.SubServer-Temporary")); + lore.add(plugin.api.getLang("SubServers", "Interface.Server-Menu.Server-Player-Count").replace("$int$", new DecimalFormat("#,###").format(json.getSection("hosts").getSection(hosts.get(server)).getSection("servers").getSection(server).getSection("players").getKeys().size()))); lore.add(ChatColor.WHITE + ((plugin.config.get().getSection("Settings").getBoolean("Show-Addresses", false))?json.getSection("hosts").getSection(hosts.get(server)).getSection("servers").getSection(server).getString("address"):json.getSection("hosts").getSection(hosts.get(server)).getSection("servers").getSection(server).getString("address").split(":")[json.getSection("hosts").getSection(hosts.get(server)).getSection("servers").getSection(server).getString("address").split(":").length - 1])); blockMeta.setLore(lore); } else if (json.getSection("hosts").getSection(hosts.get(server)).getSection("servers").getSection(server).getBoolean("running")) { @@ -1095,8 +1095,8 @@ public class InternalUIRenderer extends UIRenderer { LinkedList lore = new LinkedList(); if (!subserver.equals(json.getSection("server").getString("display"))) lore.add(ChatColor.GRAY + subserver); - lore.add(plugin.api.getLang("SubServers", "Interface.Server-Menu.Server-Player-Count").replace("$int$", new DecimalFormat("#,###").format(json.getSection("server").getSection("players").getKeys().size()))); lore.add(plugin.api.getLang("SubServers", "Interface.Server-Menu.SubServer-Temporary")); + lore.add(plugin.api.getLang("SubServers", "Interface.Server-Menu.Server-Player-Count").replace("$int$", new DecimalFormat("#,###").format(json.getSection("server").getSection("players").getKeys().size()))); lore.add(ChatColor.WHITE + ((plugin.config.get().getSection("Settings").getBoolean("Show-Addresses", false))?json.getSection("server").getString("address"):json.getSection("server").getString("address").split(":")[json.getSection("server").getString("address").split(":").length - 1])); blockMeta.setLore(lore); } else if (json.getSection("server").getBoolean("running")) { diff --git a/SubServers.Client/Bukkit/src/net/ME1312/SubServers/Client/Bukkit/Library/Compatibility/BungeeChat.java b/SubServers.Client/Bukkit/src/net/ME1312/SubServers/Client/Bukkit/Library/Compatibility/BungeeChat.java index 183392fc..ec72767a 100644 --- a/SubServers.Client/Bukkit/src/net/ME1312/SubServers/Client/Bukkit/Library/Compatibility/BungeeChat.java +++ b/SubServers.Client/Bukkit/src/net/ME1312/SubServers/Client/Bukkit/Library/Compatibility/BungeeChat.java @@ -48,7 +48,7 @@ public class BungeeChat { hoverm = new LinkedList(); message = new TextComponent(data.getSection("groups").getSection(group).getSection(server).getString("display")); hover = new TextComponent(data.getSection("groups").getSection(group).getSection(server).getString("display") + '\n'); - if (data.getSection("groups").getSection(group).getSection(server).getKeys().contains("enabled")) { + if (data.getSection("groups").getSection(group).getSection(server).getKeys().contains("host")) { message.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, label + " open SubServer/ " + server)); if (data.getSection("groups").getSection(group).getSection(server).getBoolean("temp")) { message.setColor(ChatColor.AQUA); @@ -59,9 +59,9 @@ public class BungeeChat { hover.setColor(ChatColor.GRAY); hoverm.add(hover); } - hover = new TextComponent(plugin.api.getLang("SubServers", "Interface.Server-Menu.Server-Player-Count").replace("$int$", new DecimalFormat("#,###").format(data.getSection("groups").getSection(group).getSection(server).getSection("players").getKeys().size())) + '\n'); + hover = new TextComponent(plugin.api.getLang("SubServers", "Interface.Server-Menu.SubServer-Temporary") + '\n'); hoverm.add(hover); - hover = new TextComponent(plugin.api.getLang("SubServers", "Interface.Server-Menu.SubServer-Temporary")); + hover = new TextComponent(plugin.api.getLang("SubServers", "Interface.Server-Menu.Server-Player-Count").replace("$int$", new DecimalFormat("#,###").format(data.getSection("groups").getSection(group).getSection(server).getSection("players").getKeys().size()))); } else if (data.getSection("groups").getSection(group).getSection(server).getBoolean("running")) { message.setColor(ChatColor.GREEN); hover.setColor(ChatColor.GREEN); @@ -119,10 +119,12 @@ public class BungeeChat { hoverm.add(hover); hover = new TextComponent(plugin.api.getLang("SubServers", "Interface.Server-Menu.Server-External")); hoverm.add(hover); + hover = new TextComponent(plugin.api.getLang("SubServers", "Interface.Server-Menu.Server-Player-Count").replace("$int$", new DecimalFormat("#,###").format(data.getSection("groups").getSection(group).getSection(server).getSection("players").getKeys().size())) + '\n'); + hoverm.add(hover); if (plugin.config.get().getSection("Settings").getBoolean("Show-Addresses", false)) { - hover = new TextComponent('\n' + data.getSection("servers").getSection(server).getString("address")); + hover = new TextComponent('\n' + data.getSection("groups").getSection(group).getSection(server).getString("address")); } else { - hover = new TextComponent('\n' + data.getSection("servers").getSection(server).getString("address").split(":")[data.getSection("servers").getSection(server).getString("address").split(":").length - 1]); + hover = new TextComponent('\n' + data.getSection("groups").getSection(group).getSection(server).getString("address").split(":")[data.getSection("groups").getSection(group).getSection(server).getString("address").split(":").length - 1]); } hover.setColor(ChatColor.WHITE); hoverm.add(hover); @@ -192,9 +194,9 @@ public class BungeeChat { hover.setColor(ChatColor.GRAY); hoverm.add(hover); } - hover = new TextComponent(plugin.api.getLang("SubServers", "Interface.Server-Menu.Server-Player-Count").replace("$int$", new DecimalFormat("#,###").format(data.getSection("hosts").getSection(host).getSection("servers").getSection(subserver).getSection("players").getKeys().size())) + '\n'); + hover = new TextComponent(plugin.api.getLang("SubServers", "Interface.Server-Menu.SubServer-Temporary") + '\n'); hoverm.add(hover); - hover = new TextComponent(plugin.api.getLang("SubServers", "Interface.Server-Menu.SubServer-Temporary")); + hover = new TextComponent(plugin.api.getLang("SubServers", "Interface.Server-Menu.Server-Player-Count").replace("$int$", new DecimalFormat("#,###").format(data.getSection("hosts").getSection(host).getSection("servers").getSection(subserver).getSection("players").getKeys().size()))); } else if (data.getSection("hosts").getSection(host).getSection("servers").getSection(subserver).getBoolean("running")) { message.setColor(ChatColor.GREEN); hover.setColor(ChatColor.GREEN); @@ -271,7 +273,9 @@ public class BungeeChat { hover.setColor(ChatColor.GRAY); hoverm.add(hover); } - hover = new TextComponent(plugin.api.getLang("SubServers", "Interface.Server-Menu.Server-External")); + hover = new TextComponent(plugin.api.getLang("SubServers", "Interface.Server-Menu.Server-External") + '\n'); + hoverm.add(hover); + hover = new TextComponent(plugin.api.getLang("SubServers", "Interface.Server-Menu.Server-Player-Count").replace("$int$", new DecimalFormat("#,###").format(data.getSection("servers").getSection(server).getSection("players").getKeys().size()))); hoverm.add(hover); if (plugin.config.get().getSection("Settings").getBoolean("Show-Addresses", false)) { hover = new TextComponent('\n' + data.getSection("servers").getSection(server).getString("address")); diff --git a/SubServers.Client/Bukkit/src/net/ME1312/SubServers/Client/Bukkit/SubCommand.java b/SubServers.Client/Bukkit/src/net/ME1312/SubServers/Client/Bukkit/SubCommand.java index 71c93648..92def903 100644 --- a/SubServers.Client/Bukkit/src/net/ME1312/SubServers/Client/Bukkit/SubCommand.java +++ b/SubServers.Client/Bukkit/src/net/ME1312/SubServers/Client/Bukkit/SubCommand.java @@ -87,7 +87,7 @@ public final class SubCommand implements CommandExecutor { message += ChatColor.GOLD + group + plugin.api.getLang("SubServers", "Command.List.Header"); for (String server : data.getSection("groups").getSection(group).getKeys()) { if (i != 0) message += div; - if (!data.getSection("groups").getSection(group).getSection(server).getKeys().contains("enabled")) { + if (!data.getSection("groups").getSection(group).getSection(server).getKeys().contains("host")) { message += ChatColor.WHITE; } else if (data.getSection("groups").getSection(group).getSection(server).getBoolean("temp")) { message += ChatColor.AQUA; diff --git a/SubServers.Client/Sponge/src/net/ME1312/SubServers/Client/Sponge/SubCommand.java b/SubServers.Client/Sponge/src/net/ME1312/SubServers/Client/Sponge/SubCommand.java index 9bdbe871..92b90b41 100644 --- a/SubServers.Client/Sponge/src/net/ME1312/SubServers/Client/Sponge/SubCommand.java +++ b/SubServers.Client/Sponge/src/net/ME1312/SubServers/Client/Sponge/SubCommand.java @@ -207,7 +207,7 @@ public final class SubCommand implements CommandExecutor { for (String server : data.getSection("groups").getSection(group).getKeys()) { Text.Builder message = Text.builder(data.getSection("groups").getSection(group).getSection(server).getString("display")); Text.Builder hover = Text.builder(data.getSection("groups").getSection(group).getSection(server).getString("display") + '\n'); - if (data.getSection("groups").getSection(group).getSection(server).getKeys().contains("enabled")) { + if (data.getSection("groups").getSection(group).getSection(server).getKeys().contains("host")) { message.onClick(TextActions.runCommand("/subservers open SubServer/ " + server)); if (data.getSection("groups").getSection(group).getSection(server).getBoolean("temp")) { message.color(TextColors.AQUA); @@ -216,8 +216,8 @@ public final class SubCommand implements CommandExecutor { hover.append(Text.builder(server + '\n').color(TextColors.GRAY).build()); } hover.append( - Text.of(plugin.api.getLang("SubServers", "Interface.Server-Menu.Server-Player-Count").replace("$int$", new DecimalFormat("#,###").format(data.getSection("groups").getSection(group).getSection(server).getSection("players").getKeys().size())) + '\n'), - Text.of(plugin.api.getLang("SubServers", "Interface.Server-Menu.SubServer-Temporary")) + Text.of(plugin.api.getLang("SubServers", "Interface.Server-Menu.SubServer-Temporary") + '\n'), + Text.of(plugin.api.getLang("SubServers", "Interface.Server-Menu.Server-Player-Count").replace("$int$", new DecimalFormat("#,###").format(data.getSection("groups").getSection(group).getSection(server).getSection("players").getKeys().size()))) ); } else if (data.getSection("groups").getSection(group).getSection(server).getBoolean("running")) { message.color(TextColors.GREEN); @@ -264,11 +264,14 @@ public final class SubCommand implements CommandExecutor { } else { message.color(TextColors.WHITE); hover.color(TextColors.WHITE); - hover.append(Text.of(plugin.api.getLang("SubServers", "Interface.Server-Menu.Server-External"))); + hover.append( + Text.of(plugin.api.getLang("SubServers", "Interface.Server-Menu.Server-External") + '\n'), + Text.of(plugin.api.getLang("SubServers", "Interface.Server-Menu.Server-Player-Count").replace("$int$", new DecimalFormat("#,###").format(data.getSection("groups").getSection(group).getSection(server).getSection("players").getKeys().size()))) + ); if (plugin.config.get().getSection("Settings").getBoolean("Show-Addresses", false)) { - hover.append(Text.builder('\n' + data.getSection("servers").getSection(server).getString("address")).color(TextColors.WHITE).build()); + hover.append(Text.builder('\n' + data.getSection("groups").getSection(group).getSection(server).getString("address")).color(TextColors.WHITE).build()); } else { - hover.append(Text.builder('\n' + data.getSection("servers").getSection(server).getString("address").split(":")[data.getSection("servers").getSection(server).getString("address").split(":").length - 1]).color(TextColors.WHITE).build()); + hover.append(Text.builder('\n' + data.getSection("groups").getSection(group).getSection(server).getString("address").split(":")[data.getSection("groups").getSection(group).getSection(server).getString("address").split(":").length - 1]).color(TextColors.WHITE).build()); } } message.onHover(TextActions.showText(hover.build())); @@ -321,8 +324,8 @@ public final class SubCommand implements CommandExecutor { hover.append(Text.builder(subserver + '\n').color(TextColors.GRAY).build()); } hover.append( - Text.of(plugin.api.getLang("SubServers", "Interface.Server-Menu.Server-Player-Count").replace("$int$", new DecimalFormat("#,###").format(data.getSection("hosts").getSection(host).getSection("servers").getSection(subserver).getSection("players").getKeys().size())) + '\n'), - Text.of(plugin.api.getLang("SubServers", "Interface.Server-Menu.SubServer-Temporary")) + Text.of(plugin.api.getLang("SubServers", "Interface.Server-Menu.SubServer-Temporary") + '\n'), + Text.of(plugin.api.getLang("SubServers", "Interface.Server-Menu.Server-Player-Count").replace("$int$", new DecimalFormat("#,###").format(data.getSection("hosts").getSection(host).getSection("servers").getSection(subserver).getSection("players").getKeys().size()))) ); } else if (data.getSection("hosts").getSection(host).getSection("servers").getSection(subserver).getBoolean("running")) { message.color(TextColors.GREEN); @@ -383,7 +386,9 @@ public final class SubCommand implements CommandExecutor { if (!server.equals(data.getSection("servers").getSection(server).getString("display"))) { hover.append(Text.builder(server + '\n').color(TextColors.GRAY).build()); } - hover.append(Text.of(plugin.api.getLang("SubServers", "Interface.Server-Menu.Server-External"))); + hover.append( + Text.of(plugin.api.getLang("SubServers", "Interface.Server-Menu.Server-External") + '\n'), + Text.of(plugin.api.getLang("SubServers", "Interface.Server-Menu.Server-Player-Count").replace("$int$", new DecimalFormat("#,###").format(data.getSection("servers").getSection(server).getSection("players").getKeys().size())))); if (plugin.config.get().getSection("Settings").getBoolean("Show-Addresses", false)) { hover.append(Text.builder('\n' + data.getSection("servers").getSection(server).getString("address")).color(TextColors.WHITE).build()); } else { diff --git a/SubServers.Host/src/net/ME1312/SubServers/Host/SubCommand.java b/SubServers.Host/src/net/ME1312/SubServers/Host/SubCommand.java index e28368bc..1062358a 100644 --- a/SubServers.Host/src/net/ME1312/SubServers/Host/SubCommand.java +++ b/SubServers.Host/src/net/ME1312/SubServers/Host/SubCommand.java @@ -112,7 +112,7 @@ public class SubCommand { message += TextColor.GOLD + group + TextColor.RESET + ": "; for (String server : data.getSection("groups").getSection(group).getKeys()) { if (i != 0) message += div; - if (!data.getSection("groups").getSection(group).getSection(server).contains("enabled")) { + if (!data.getSection("groups").getSection(group).getSection(server).contains("host")) { message += TextColor.WHITE; } else if (data.getSection("groups").getSection(group).getSection(server).getBoolean("temp")) { message += TextColor.AQUA; diff --git a/SubServers.Sync/src/net/ME1312/SubServers/Sync/SubCommand.java b/SubServers.Sync/src/net/ME1312/SubServers/Sync/SubCommand.java index 4583e4a4..cf7287e5 100644 --- a/SubServers.Sync/src/net/ME1312/SubServers/Sync/SubCommand.java +++ b/SubServers.Sync/src/net/ME1312/SubServers/Sync/SubCommand.java @@ -102,7 +102,7 @@ public final class SubCommand extends CommandX { message += ChatColor.GOLD + group + ChatColor.RESET + ": "; for (String server : data.getSection("groups").getSection(group).getKeys()) { if (i != 0) message += div; - if (!data.getSection("groups").getSection(group).getSection(server).contains("enabled")) { + if (!data.getSection("groups").getSection(group).getSection(server).contains("host")) { message += ChatColor.WHITE; } else if (data.getSection("groups").getSection(group).getSection(server).getBoolean("temp")) { message += ChatColor.AQUA;