From 3cf6f28d83a946b2751a4c00a258be9639c20436 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Sat, 21 Jan 2023 14:59:37 -0500 Subject: [PATCH] Only returning inactive mines in list. --- src/engine/objects/Mine.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/engine/objects/Mine.java b/src/engine/objects/Mine.java index 132700c0..b43bf21e 100644 --- a/src/engine/objects/Mine.java +++ b/src/engine/objects/Mine.java @@ -336,9 +336,14 @@ public class Mine extends AbstractGameObject { } public static ArrayList getMinesForGuild(int guildID) { + ArrayList mineList = new ArrayList<>(); + + // Only inactive mines are returned. + for (Mine mine : Mine.mineMap.keySet()) { - if (mine.owningGuild.getObjectUUID() == guildID) + if (mine.owningGuild.getObjectUUID() == guildID && + mine.isActive == false) mineList.add(mine); } return mineList;