From 2c3aa6e7e5416fc8e12649a15c85380650f7602b Mon Sep 17 00:00:00 2001 From: MagicBot Date: Sat, 21 Jan 2023 08:42:43 -0500 Subject: [PATCH] Cleanup of restriction logic. --- .../net/client/handlers/MineWindowChangeHandler.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/engine/net/client/handlers/MineWindowChangeHandler.java b/src/engine/net/client/handlers/MineWindowChangeHandler.java index a142bec5..e24c81b4 100644 --- a/src/engine/net/client/handlers/MineWindowChangeHandler.java +++ b/src/engine/net/client/handlers/MineWindowChangeHandler.java @@ -96,12 +96,13 @@ public class MineWindowChangeHandler extends AbstractClientMsgHandler { return true; } - // Cannot set a time to a window that has not closed if mines are currently open. + // Cannot set a time to a window that has closed if mines are currently open. if (LocalDateTime.now().getHour() >= MBServerStatics.MINE_EARLY_WINDOW && - newMineTime <= LocalDateTime.now().getHour() && LocalDateTime.now().getHour() != MBServerStatics.MINE_LATE_WINDOW) { - ErrorPopupMsg.sendErrorMsg(playerCharacter, "You must first wait for that mine window to close."); + + if (newMineTime <= LocalDateTime.now().getHour()) + ErrorPopupMsg.sendErrorMsg(playerCharacter, "Cannot set mines to a previous window."); return true; }