aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/github/moulberry/notenoughupdates/options/NEUConfig.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/options/NEUConfig.java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/options/NEUConfig.java16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/options/NEUConfig.java b/src/main/java/io/github/moulberry/notenoughupdates/options/NEUConfig.java
index d4a078a9..06619ffd 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/options/NEUConfig.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/options/NEUConfig.java
@@ -365,13 +365,19 @@ public class NEUConfig extends Config {
}
public HiddenLocationSpecific getLocationSpecific() {
- if(SBInfo.getInstance().location == null) {
- return null;
- }
- return hidden.locationSpecific.computeIfAbsent(SBInfo.getInstance().getLocation(), k-> new HiddenLocationSpecific());
+ String location = SBInfo.getInstance().getLocation();
+ if(location == null || location.isEmpty()) {
+ return null;
}
- public static class HiddenLocationSpecific {
+ return getLocationSpecific(location);
+ }
+
+ public HiddenLocationSpecific getLocationSpecific(String location) {
+ return hidden.locationSpecific.computeIfAbsent(location, k-> new HiddenLocationSpecific());
+ }
+
+ public static class HiddenLocationSpecific {
@Expose public Map<String, Integer> commissionMaxes = new HashMap<>();
}