Early exit for errant mines.

This commit is contained in:
2023-01-13 14:04:14 -05:00
parent 14247715fd
commit 43380962cc
+7 -3
View File
@@ -177,10 +177,14 @@ public class Mine extends AbstractGameObject {
int nextMineHour = MBServerStatics.MINE_EARLY_WINDOW;; int nextMineHour = MBServerStatics.MINE_EARLY_WINDOW;;
LocalDateTime nextOpenDate = LocalDateTime.now().withMinute(0).withSecond(0).withNano(0); 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) if (this.owningGuild == null || this.owningGuild.isErrant() == false)
nextMineHour = this.owningGuild.getMineTime(); return;
// Use the new owners Mine WOO.
nextMineHour = this.owningGuild.getMineTime();
if ((this.openDate.getHour() == 0 || this.openDate.getHour() == 24) && if ((this.openDate.getHour() == 0 || this.openDate.getHour() == 24) &&
(this.owningGuild.getMineTime() != 0 && this.owningGuild.getMineTime() != 24)) (this.owningGuild.getMineTime() != 0 && this.owningGuild.getMineTime() != 24))