diff --git a/src/main/java/Xera/Bungee/Queue/Bungee/Config.java b/src/main/java/Xera/Bungee/Queue/Bungee/Config.java index bfd8e13..7f9ff75 100644 --- a/src/main/java/Xera/Bungee/Queue/Bungee/Config.java +++ b/src/main/java/Xera/Bungee/Queue/Bungee/Config.java @@ -11,7 +11,7 @@ public class Config { public static boolean POSITIONMESSAGEHOTBAR, ENABLEKICKMESSAGE, SERVERPINGINFOENABLE, ENABLEAUTHSERVER, ALWAYSQUEUE, CUSTOMPROTOCOLENABLE, REGISTERTAB, AUTHFIRST; - public static int MAINSERVERSLOTS,QUEUEMOVEDELAY, QUEUESERVERSLOTS; + public static int MAINSERVERSLOTS, QUEUEMOVEDELAY, QUEUESERVERSLOTS, SERVERONLINECHECKDELAY; public static List SERVERPINGINFO, HEADER, FOOTER, HEADERPRIORITY, FOOTERPRIORITY; } diff --git a/src/main/java/Xera/Bungee/Queue/Bungee/XeraBungeeQueue.java b/src/main/java/Xera/Bungee/Queue/Bungee/XeraBungeeQueue.java index 70621ca..8e48141 100644 --- a/src/main/java/Xera/Bungee/Queue/Bungee/XeraBungeeQueue.java +++ b/src/main/java/Xera/Bungee/Queue/Bungee/XeraBungeeQueue.java @@ -374,7 +374,7 @@ public void onEnable() { } BungeeEvents.mainonline = error == null; - }), 500, 2000, TimeUnit.MILLISECONDS); + }), 500, Config.SERVERONLINECHECKDELAY, TimeUnit.MILLISECONDS); getProxy().getScheduler().schedule(this, () -> ProxyServer.getInstance().getServerInfo(Config.QUEUESERVER).ping((result, error) -> { if (error != null) { @@ -382,7 +382,7 @@ public void onEnable() { } BungeeEvents.queueonline = error == null; - }), 500, 2000, TimeUnit.MILLISECONDS); + }), 500, Config.SERVERONLINECHECKDELAY, TimeUnit.MILLISECONDS); getProxy().getScheduler().schedule(this, () -> { if (Config.ENABLEAUTHSERVER) { @@ -396,7 +396,7 @@ public void onEnable() { } else { BungeeEvents.authonline = true; } - }, 500, 2000, TimeUnit.MILLISECONDS); + }, 500, Config.SERVERONLINECHECKDELAY, TimeUnit.MILLISECONDS); } void processConfig() { diff --git a/src/main/resources/bungeeconfig.yml b/src/main/resources/bungeeconfig.yml index e4af999..41be465 100644 --- a/src/main/resources/bungeeconfig.yml +++ b/src/main/resources/bungeeconfig.yml @@ -13,6 +13,9 @@ REGISTERTAB: true # Server is full message SERVERISFULLMESSAGE: "&6YOURSERVER is full" +# It is not recommended to decrease this number (milliseconds) +SERVERONLINECHECKDELAY: 2000 + # Position in queue message by default only sends in chat every 10 seconds # you can have it on the hotbar by setting POSITIONMESSAGEHOTBAR: "false" to true POSITIONMESSAGEHOTBAR: false