Added require-queueserver-permission option to the config
This commit is contained in:
@@ -108,7 +108,13 @@ public class EventHandlerImpl implements EventHandler {
|
|||||||
String[] parts = s.split(":");
|
String[] parts = s.split(":");
|
||||||
String from = parts[0];
|
String from = parts[0];
|
||||||
QueueServer to = main.getQueueManager().findServer(parts[1]);
|
QueueServer to = main.getQueueManager().findServer(parts[1]);
|
||||||
if(from.equalsIgnoreCase(serverName) && to != null) {
|
if(
|
||||||
|
from.equalsIgnoreCase(serverName) && to != null &&
|
||||||
|
(
|
||||||
|
!main.getConfig().getBoolean("require-queueserver-permission") ||
|
||||||
|
player.hasPermission("ajqueue.queueserver." + to.getName())
|
||||||
|
)
|
||||||
|
) {
|
||||||
main.getQueueManager().addToQueue(player, to);
|
main.getQueueManager().addToQueue(player, to);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -467,7 +467,13 @@ public class QueueManagerImpl implements QueueManager {
|
|||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(!getPlayerQueues(player).contains(to)) {
|
if(
|
||||||
|
!getPlayerQueues(player).contains(to) &&
|
||||||
|
(
|
||||||
|
!main.getConfig().getBoolean("require-queueserver-permission") ||
|
||||||
|
player.hasPermission("ajqueue.queueserver." + to.getName())
|
||||||
|
)
|
||||||
|
) {
|
||||||
addToQueue(player, to);
|
addToQueue(player, to);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -255,18 +255,25 @@ tab-complete-queues: true
|
|||||||
|
|
||||||
# Should we have no wait time for these servers?
|
# Should we have no wait time for these servers?
|
||||||
# If the server is joinable, the plugin will attempt to send players who join these queues as soon as they join.
|
# If the server is joinable, the plugin will attempt to send players who join these queues as soon as they join.
|
||||||
# If the server is not immidiatly joinable, they will have to wait for the normal wait-time
|
# If the server is not immediately joinable, they will have to wait for the normal wait-time
|
||||||
# This also works with group
|
# This also works with group
|
||||||
# NOTE: Server names are caps sensitive
|
# NOTE: Server names are caps sensitive
|
||||||
send-instantly:
|
send-instantly:
|
||||||
- "lobbys"
|
- "lobbys"
|
||||||
|
|
||||||
# After how many (unsuccessfull) attempts of sending the player should we remove them from the queue?
|
# Should we require permissions for queue-servers to work?
|
||||||
|
# If enabled, players will need to have the ajqueue.queueserver.<server> permission
|
||||||
|
# <server> being the target server
|
||||||
|
# Note that this will only affect queue-servers
|
||||||
|
# Default: false
|
||||||
|
require-queueserver-permission: false
|
||||||
|
|
||||||
|
# After how many (unsuccessful) attempts of sending the player should we remove them from the queue?
|
||||||
# Set to -1 to disable
|
# Set to -1 to disable
|
||||||
# Default: 10
|
# Default: 10
|
||||||
max-tries: 10
|
max-tries: 10
|
||||||
|
|
||||||
# Should we check to make sure that people dont get sent quicker than wait-time?
|
# Should we check to make sure that people don't get sent quicker than wait-time?
|
||||||
# Default: true
|
# Default: true
|
||||||
check-last-player-sent-time: true
|
check-last-player-sent-time: true
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user