Fixed status.now-in-queue message being sent to players with bypass permissions

This commit is contained in:
ajgeiss0702
2023-01-16 09:53:53 -07:00
parent f92f99ec4e
commit e2f06b0902
@@ -249,11 +249,13 @@ public class QueueManagerImpl implements QueueManager {
boolean alwaysSendInstantly = main.getConfig().getStringList("send-instantly").contains(server.getName());
boolean hasBypass = main.getLogic().hasAnyBypass(player, server.getName());
boolean sentInstantly = alwaysSendInstantly || (sendInstant && (sendInstantp && timeGood) && !hasBypass);
boolean sentInstantly = alwaysSendInstantly || (sendInstant && (sendInstantp && timeGood)) || hasBypass;
Debug.info("should send instantly (" + sentInstantly + "): " + alwaysSendInstantly + " || (" + sendInstant + " && (" + sendInstantp + " && " + timeGood + ") && " + (!hasBypass) + ")");
if(sentInstantly) {
if(!hasBypass) {
sendPlayers(server);
}
if(!msgs.isEmpty("status.now-in-empty-queue")) {
player.sendMessage(msgs.getComponent("status.now-in-empty-queue",
"POS:"+pos,