From 063d422a79d4bda0149ed3e3b41e3c13f6eaad2d Mon Sep 17 00:00:00 2001 From: ajgeiss0702 Date: Tue, 18 Aug 2020 07:31:07 -0700 Subject: [PATCH] added send-instantly to config --- src/main/java/us/ajg0702/queue/Manager.java | 3 ++- src/main/resources/config.yml | 11 ++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/main/java/us/ajg0702/queue/Manager.java b/src/main/java/us/ajg0702/queue/Manager.java index 4b5027b..d5e7b6f 100644 --- a/src/main/java/us/ajg0702/queue/Manager.java +++ b/src/main/java/us/ajg0702/queue/Manager.java @@ -614,7 +614,8 @@ public class Manager { } int pos = list.indexOf(p)+1; int len = list.size(); - if(list.size() <= 1 && server.isOnline() && server.canAccess(p) && !server.isFull() && !server.isWhitelisted()) { + boolean sendInstant = pl.config.getStringList("send-instantly").indexOf(server.getName()) != -1; + if((list.size() <= 1 || sendInstant) && server.canAccess(p)) { sendPlayers(s); BaseComponent[] m = msgs.getBC("status.now-in-empty-queue", "POS:"+pos, "LEN:"+len, "SERVER:"+pl.aliases.getAlias(s)); if(TextComponent.toPlainText(m).length() > 0) { diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index c0d8d2d..55b590c 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -1,5 +1,5 @@ # Dont touch this number please -config-version: 15 +config-version: 16 # The time the server will wait between sending people in the queue # Default: 5 @@ -123,3 +123,12 @@ server-groups: # Should we allow tab-completing in the /queue command? # Default: true tab-complete-queues: true + +# Should we have no wait time for these servers? +# If the server is joinable, the plugin will attempt to send players who join these queues as soon as they join. +# If the server is not immidiatly joinable, they will have to wait for the normal wait-time +# This also works with group +# NOTE: Server names are caps sensitive +send-instantly: +- "lobbys" +