catch process mine window logic

This commit is contained in:
2024-06-03 19:47:23 -05:00
parent 9c64dbb70c
commit 72d73883a4
+4
View File
@@ -664,6 +664,7 @@ public class Mine extends AbstractGameObject {
public static void processMineWindows() {
LocalDateTime currentTime = LocalDateTime.now();
for (Mine mine : Mine.getMines()) {
try {
Building tower = BuildingManager.getBuildingFromCache(mine.getBuildingID());
//if the tower comes back null, skip this mine
if (tower == null)
@@ -693,6 +694,9 @@ public class Mine extends AbstractGameObject {
ChatManager.chatSystemChannel(tower.getGuild().getNation().getName() + " has successfully defended the " + mine.getParentZone().getName() + " " + mine.getMineType() + " MINE, and retains their claim.");
}
}
} catch (Exception ex) {
Logger.error("Mine Failed: " + mine.getObjectUUID() + " " + ex.getMessage());
}
}
}
}