Added remove-player-on-server-switch to the config

This commit is contained in:
ajgeiss0702
2020-06-18 09:20:48 -07:00
parent 665331c02a
commit a8b567abe8
2 changed files with 16 additions and 2 deletions
+7 -1
View File
@@ -110,7 +110,13 @@ public class Main extends Plugin implements Listener {
ProxiedPlayer p = e.getPlayer();
Server alreadyqueued = man.findPlayerInQueue(p);
if(alreadyqueued != null) {
alreadyqueued.getQueue().remove(p);
List<ProxiedPlayer> queue = alreadyqueued.getQueue();
int pos = queue.indexOf(p);
if(pos == 0) {
queue.remove(p);
} else if(config.getBoolean("remove-player-on-server-switch")) {
queue.remove(p);
}
}
String servername = e.getPlayer().getServer().getInfo().getName();
+8
View File
@@ -28,3 +28,11 @@ send-actionbar: true
kick-reasons:
- 'banned'
- 'blacklisted'
# Should we remove a player from the queue if they move servers?
# If they join another queue, they will be removed from the previous one no matter what
# This is more meant for if you have multiple lobbies if you want to let the player switch
# between them without losing their queue position
# Default: true
remove-player-on-server-switch: true