Added remove-player-on-server-switch to the config
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user