Skip to content

Commit

Permalink
no notify if we have active player as rc is skipped
Browse files Browse the repository at this point in the history
  • Loading branch information
rfresh2 committed Oct 17, 2024
1 parent 7d2b288 commit f1b2650
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/main/java/com/zenith/Proxy.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@

import static com.github.rfresh2.EventConsumer.of;
import static com.zenith.Shared.*;
import static java.util.Objects.isNull;
import static java.util.Objects.nonNull;


Expand Down Expand Up @@ -757,9 +756,10 @@ public void handleServerRestartingEvent(ServerRestartingEvent event) {
|| !CONFIG.client.extra.autoReconnect.enabled
|| !isOn2b2t()
|| isPrio()
|| !isNull(getCurrentPlayer().get())
|| hasActivePlayer()
|| isInQueue()) return;
EXECUTOR.schedule(() -> {
if (hasActivePlayer()) return;
if (DISCORD.isRunning()) {
DISCORD.sendEmbedMessage(
Embed.builder()
Expand All @@ -769,9 +769,7 @@ public void handleServerRestartingEvent(ServerRestartingEvent event) {
} else {
CLIENT_LOG.warn("AutoReconnecting to end of queue to get back into server as quick as possible");
}
if (isNull(getCurrentPlayer().get())) {
disconnect(SYSTEM_DISCONNECT);
}
disconnect(SYSTEM_DISCONNECT);
MODULE.get(AutoReconnect.class).scheduleAutoReconnect(60);
}, ((int) (Math.random() * 20)), TimeUnit.SECONDS);
}
Expand Down

0 comments on commit f1b2650

Please sign in to comment.