wip: balancer modes

This commit is contained in:
ajgeiss0702
2021-10-09 11:30:29 -07:00
parent a5957bd7cb
commit 5d76c2defb
4 changed files with 27 additions and 2 deletions
@@ -116,7 +116,9 @@ public class QueueManagerImpl implements QueueManager {
return false;
}
if(player.getServerName().equals(server.getName())) {
List<AdaptedServer> notInServers = new ArrayList<>(server.getServers());
notInServers.removeIf(adaptedServer -> !adaptedServer.getName().equals(player.getServerName()));
if(notInServers.size() > 0) {
player.sendMessage(msgs.getComponent("errors.already-connected", "SERVER:"+server.getAlias()));
return false;
}
+10 -1
View File
@@ -267,4 +267,13 @@ enable-updater: true
# For example, if survival is in this list, then if a player executes /survival
# then they will be put in the queue for survival
# This works for both servers and groups
slash-servers: []
slash-servers: []
# What balancer should we use?
# If a group is not specified here, then the default one is used
# Example entry: - bedwars: minigame
# Balancers:
# default - Will send the player to the server in the group with the least number of players
# minigame - Will send the player to the server with the most players, until that server is full, which it will then send to the next full server
balancer-types:
- bedwars: minigame