added unjoinable priorities

This commit is contained in:
ajgeiss0702
2021-11-05 11:18:40 -07:00
parent 1cf96df334
commit d1515d5245
4 changed files with 58 additions and 5 deletions
@@ -6,6 +6,7 @@ import net.kyori.adventure.title.Title;
import us.ajg0702.queue.api.QueueManager;
import us.ajg0702.queue.api.players.AdaptedPlayer;
import us.ajg0702.queue.api.players.QueuePlayer;
import us.ajg0702.queue.api.premium.Logic;
import us.ajg0702.queue.api.queues.QueueServer;
import us.ajg0702.queue.api.server.AdaptedServer;
import us.ajg0702.queue.common.players.QueuePlayerImpl;
@@ -151,6 +152,7 @@ public class QueueManagerImpl implements QueueManager {
} else {
int priority = player.hasPermission("ajqueue.priority") ||
player.hasPermission("ajqueue.serverpriority."+server.getName()) ? 1 : 0;
priority = Math.max(priority, Logic.getUnJoinablePriorities(server, player) > 0 ? 1 : 0);
int maxOfflineTime = player.hasPermission("ajqueue.stayqueued") ? 60 : 0;
queuePlayer = new QueuePlayerImpl(player, server, priority, maxOfflineTime);
if(
+19 -2
View File
@@ -1,5 +1,5 @@
# Dont touch this number please
config-version: 30
config-version: 31
# This is the main config for ajQueue.
@@ -278,6 +278,23 @@ slash-servers: []
balancer-types:
- "bedwars:minigame"
# What priority should we give whitelisted players priority when the server is whitelisted?
# This will have no effect if the server isnt whitelisted
# If you set to 0, this will be disabled
# If you have the free version, set it to 1 to enable
give-whitelisted-players-priority: 0
# Should we print some extra stuff to the console that might help diagnose some issues?
# What priority should we give players that are able to bypass paused priority when the server is paused?
# This will have no effect if the server isnt paused
# If you set to 0, this will be disabled
# If you have the free version, set it to 1 to enable
give-pausedbypass-players-priority: 0
# What priority should we give players that are able to bypass full servers priority when the server is full?
# This will have no effect if the server isnt full
# If you set to 0, this will be disabled
# If you have the free version, set it to 1 to enable
give-fulljoin-players-priority: 0
# Should we print some extra stuff to the console that might help aj diagnose some issues?
debug: false