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();
|
ProxiedPlayer p = e.getPlayer();
|
||||||
Server alreadyqueued = man.findPlayerInQueue(p);
|
Server alreadyqueued = man.findPlayerInQueue(p);
|
||||||
if(alreadyqueued != null) {
|
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();
|
String servername = e.getPlayer().getServer().getInfo().getName();
|
||||||
|
|||||||
@@ -27,4 +27,12 @@ send-actionbar: true
|
|||||||
# a server in a queue with a message saying "You are banned from this server!" then it will kick them from the queue too.
|
# a server in a queue with a message saying "You are banned from this server!" then it will kick them from the queue too.
|
||||||
kick-reasons:
|
kick-reasons:
|
||||||
- 'banned'
|
- 'banned'
|
||||||
- 'blacklisted'
|
- '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