From 43380962ccf7b0432b3814f0f5cd140ee21d905f Mon Sep 17 00:00:00 2001 From: MagicBot Date: Fri, 13 Jan 2023 14:04:14 -0500 Subject: [PATCH] Early exit for errant mines. --- src/engine/objects/Mine.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/engine/objects/Mine.java b/src/engine/objects/Mine.java index bf6cd436..88c54866 100644 --- a/src/engine/objects/Mine.java +++ b/src/engine/objects/Mine.java @@ -177,10 +177,14 @@ public class Mine extends AbstractGameObject { int nextMineHour = MBServerStatics.MINE_EARLY_WINDOW;; LocalDateTime nextOpenDate = LocalDateTime.now().withMinute(0).withSecond(0).withNano(0); - // Use the new owners Mine WOO. If errant use Early window for this server. + // If errant use mine stays open. - if (this.owningGuild != null || this.owningGuild.isErrant() == false) - nextMineHour = this.owningGuild.getMineTime(); + if (this.owningGuild == null || this.owningGuild.isErrant() == false) + return; + + // Use the new owners Mine WOO. + + nextMineHour = this.owningGuild.getMineTime(); if ((this.openDate.getHour() == 0 || this.openDate.getHour() == 24) && (this.owningGuild.getMineTime() != 0 && this.owningGuild.getMineTime() != 24))