From 4734f23805c8b139483ec7df2691086da2c39871 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Wed, 22 May 2024 20:27:27 -0500 Subject: [PATCH] check if mines are active before spamming them to open --- src/engine/workthreads/MineThread.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/engine/workthreads/MineThread.java b/src/engine/workthreads/MineThread.java index f0d32e5d..f0e1f424 100644 --- a/src/engine/workthreads/MineThread.java +++ b/src/engine/workthreads/MineThread.java @@ -36,17 +36,17 @@ public class MineThread implements Runnable { LocalDateTime openTime = LocalDateTime.now().withHour(mine.liveTime).withMinute(minute).withSecond(0); LocalDateTime closeTime = openTime.plusMinutes(30); - if (now.isAfter(openTime)) { + if (now.isAfter(openTime) && !mine.isActive) { mineWindowOpen(mine); continue; // mine has not opened today yet, and it is now after the time it should have, open the mine } - if(now.isAfter(closeTime) && BuildingManager.getBuilding(mine.getBuildingID()).getRank() == 1) { + if(now.isAfter(closeTime) && BuildingManager.getBuilding(mine.getBuildingID()).getRank() == 1 && mine.isActive) { mineWindowClose(mine); continue; // mine was never knocked down, close it } - if(now.isAfter(closeTime) && mine.lastClaimer == null){ + if(now.isAfter(closeTime) && mine.lastClaimer == null && mine.isActive){ if(mine.firstThirty){ mine.firstThirty = false; }else{