Slight configuration change

This commit is contained in:
ME1312 2018-08-06 02:08:55 -04:00
parent 38eec66a4b
commit e74178e21c
No known key found for this signature in database
GPG Key ID: FEFFE2F698E88FA8
3 changed files with 3 additions and 3 deletions

View File

@ -1,5 +1,5 @@
![https://s3.postimg.cc/dikyxlz5v/Sub_Banner.png](https://s3.postimg.cc/dikyxlz5v/Sub_Banner.png)<br>
SubServers 2 is a rewrite of SubServers, the Server Management Platform.<br>
SubServers 2 is a rewrite of SubServers, the Server Management Platform. &nbsp; [![Build Status](https://src.me1312.net/jenkins/job/SubServers%20Platform/badge/icon)](https://src.me1312.net/jenkins/job/SubServers%20Platform/)<br>
> [https://www.spigotmc.org/resources/subservers-bungee.11264/](https://www.spigotmc.org/resources/subservers-bungee.11264/)<br>
> [https://www.spigotmc.org/resources/subservers-host.38833/](https://www.spigotmc.org/resources/subservers-host.38833/)<br>
> [https://www.spigotmc.org/resources/subservers-sync.46124/](https://www.spigotmc.org/resources/subservers-sync.46124/)<br>

View File

@ -9,6 +9,6 @@ Settings:
Sync:
Disabled-Commands: false
Forced-Hosts: true
MOTD: false
Motd: false
Player-Limit: false
Server-Priorities: true

View File

@ -96,7 +96,7 @@ public final class SubDataClient {
LinkedList<ListenerInfo> listeners = new LinkedList<ListenerInfo>(plugin.getConfig().getListeners());
for (int i = 0; i < proxy.getSection("bungee").getSectionList("listeners").size(); i++) if (i < listeners.size()) {
if (plugin.config.get().getSection("Sync", new YAMLSection()).getBoolean("Forced-Hosts", true)) updateField(ListenerInfo.class.getDeclaredField("forcedHosts"), listeners.get(i), proxy.getSection("bungee").getSectionList("listeners").get(i).getSection("forced-hosts").get());
if (plugin.config.get().getSection("Sync", new YAMLSection()).getBoolean("MOTD", false)) updateField(ListenerInfo.class.getDeclaredField("motd"), listeners.get(i), proxy.getSection("bungee").getSectionList("listeners").get(i).getRawString("motd"));
if (plugin.config.get().getSection("Sync", new YAMLSection()).getBoolean("Motd", false)) updateField(ListenerInfo.class.getDeclaredField("motd"), listeners.get(i), proxy.getSection("bungee").getSectionList("listeners").get(i).getRawString("motd"));
if (plugin.config.get().getSection("Sync", new YAMLSection()).getBoolean("Player-Limit", false)) updateField(ListenerInfo.class.getDeclaredField("maxPlayers"), listeners.get(i), proxy.getSection("bungee").getSectionList("listeners").get(i).getInt("player-limit"));
if (plugin.config.get().getSection("Sync", new YAMLSection()).getBoolean("Server-Priorities", true)) updateField(ListenerInfo.class.getDeclaredField("serverPriority"), listeners.get(i), proxy.getSection("bungee").getSectionList("listeners").get(i).getRawStringList("priorities"));
}