diff --git a/core/src/main/java/tc/oc/pgm/api/module/ModuleGraph.java b/core/src/main/java/tc/oc/pgm/api/module/ModuleGraph.java index 96a7825955..239f574334 100644 --- a/core/src/main/java/tc/oc/pgm/api/module/ModuleGraph.java +++ b/core/src/main/java/tc/oc/pgm/api/module/ModuleGraph.java @@ -4,7 +4,7 @@ import java.util.Collection; import java.util.Collections; -import java.util.HashMap; +import java.util.LinkedHashMap; import java.util.Map; import java.util.Stack; import java.util.concurrent.atomic.AtomicBoolean; @@ -60,7 +60,7 @@ protected void loadAll() throws ModuleLoadException { protected void unloadAll() { if (loaded.compareAndSet(true, false)) { - modules = new HashMap<>(factories.size()); + modules = new LinkedHashMap<>(factories.size()); } } diff --git a/core/src/main/java/tc/oc/pgm/variables/VariablesModule.java b/core/src/main/java/tc/oc/pgm/variables/VariablesModule.java index 14276a1774..a802d488a6 100644 --- a/core/src/main/java/tc/oc/pgm/variables/VariablesModule.java +++ b/core/src/main/java/tc/oc/pgm/variables/VariablesModule.java @@ -24,6 +24,7 @@ import tc.oc.pgm.api.module.exception.ModuleLoadException; import tc.oc.pgm.blitz.BlitzMatchModule; import tc.oc.pgm.filters.Filterable; +import tc.oc.pgm.regions.RegionMatchModule; import tc.oc.pgm.score.ScoreMatchModule; import tc.oc.pgm.teams.TeamMatchModule; import tc.oc.pgm.util.math.Formula; @@ -50,7 +51,11 @@ public VariablesModule(ImmutableList> variables) { @Override public @Nullable Collection> getWeakDependencies() { - return ImmutableList.of(TeamMatchModule.class, BlitzMatchModule.class, ScoreMatchModule.class); + return ImmutableList.of( + TeamMatchModule.class, + BlitzMatchModule.class, + ScoreMatchModule.class, + RegionMatchModule.class); } @SuppressWarnings("unchecked")