Merge pull request #2 from PerchunPak/lobby-messages

Join to Skyblock if found `lobby`'s messages
This commit is contained in:
Night 2023-06-13 22:07:34 +01:00 committed by GitHub
commit 94fa30fd03
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -96,18 +96,21 @@ public class ChatReceivedEvent {
Flipper.state = FlipperState.NONE;
Lilase.cofl.toggleAuction();
}
if (message.contains("You were spawned in Limbo")) {
if (message.contains("You were spawned in Limbo") || message.contains("return from AFK")) {
try {
Utils.debugLog("Detected in Limbo, stopping everything for 5 minutes");
Utils.addTitle("You got sent to Limbo!");
Utils.debugLog("Detected in Limbo or Lobby, sending you back to skyblock");
Utils.addTitle("You got sent to Limbo or Lobby!");
Flipper.state = FlipperState.NONE;
if (Lilase.cofl.isOpen()) Lilase.cofl.toggleAuction();
Thread.sleep(5000);
Thread.sleep(5000 + new Random().nextInt(500));
Utils.sendServerMessage("/lobby");
Thread.sleep(5000);
Thread.sleep(5000 + new Random().nextInt(500));
Utils.sendServerMessage("/skyblock");
Thread bzchillingthread = new Thread(bazaarChilling);
bzchillingthread.start();
Thread.sleep(5000 + new Random().nextInt(500));
Utils.sendServerMessage("/hub");
if (!Lilase.cofl.isOpen()) Lilase.cofl.toggleAuction();
// Thread bzchillingthread = new Thread(bazaarChilling);
// bzchillingthread.start();
} catch (Exception ignored) {
}
}