diff options
author | DoKM <54663875+DoKM@users.noreply.github.com> | 2021-08-22 20:00:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-22 20:00:39 +0200 |
commit | 9352b4bb5b58d4907bd059f2194dfa1f0d68a8c6 (patch) | |
tree | e59260c9e2ba1873189a79ba76c003e63cfa08c9 /src/main/java | |
parent | 94b18d4c9ff306e9ba6e85d424297c638722b61a (diff) | |
parent | c974622ac48bbe92621f6297e2eb7cec7df1e17a (diff) | |
download | NotEnoughUpdates-9352b4bb5b58d4907bd059f2194dfa1f0d68a8c6.tar.gz NotEnoughUpdates-9352b4bb5b58d4907bd059f2194dfa1f0d68a8c6.tar.bz2 NotEnoughUpdates-9352b4bb5b58d4907bd059f2194dfa1f0d68a8c6.zip |
Merge pull request #24 from DeDiamondPro/master
o no null
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/overlays/AutomatonOverlay.java | 4 | ||||
-rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/overlays/DivanMinesOverlay.java | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/overlays/AutomatonOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/overlays/AutomatonOverlay.java index 878bbc44..a0ef88b8 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/overlays/AutomatonOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/overlays/AutomatonOverlay.java @@ -32,12 +32,13 @@ public class AutomatonOverlay extends TextOverlay { @Override public void update() { - NEUConfig.HiddenProfileSpecific hidden = NotEnoughUpdates.INSTANCE.config.getProfileSpecific(); overlayStrings = null; if (!NotEnoughUpdates.INSTANCE.config.mining.automatonOverlay || SBInfo.getInstance().getLocation() == null || !SBInfo.getInstance().getLocation().equals("crystal_hollows") || !SBInfo.getInstance().location.equals("Lost Precursor City")) return; + NEUConfig.HiddenProfileSpecific hidden = NotEnoughUpdates.INSTANCE.config.getProfileSpecific(); + if (hidden == null) return; overlayStrings = new ArrayList<>(); HashMap<String, String> states = new HashMap<>(); for (String key : hidden.automatonParts.keySet()) { @@ -78,6 +79,7 @@ public class AutomatonOverlay extends TextOverlay { public void message(String message) { NEUConfig.HiddenProfileSpecific hidden = NotEnoughUpdates.INSTANCE.config.getProfileSpecific(); + if (hidden == null) return; if (message.startsWith(" ")) { String item = message.replace(" ", ""); if (hidden.automatonParts.containsKey(item)) { diff --git a/src/main/java/io/github/moulberry/notenoughupdates/overlays/DivanMinesOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/overlays/DivanMinesOverlay.java index 7bf359c2..85ac2f82 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/overlays/DivanMinesOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/overlays/DivanMinesOverlay.java @@ -40,6 +40,7 @@ public class DivanMinesOverlay extends TextOverlay { return; NEUConfig.HiddenProfileSpecific hidden = NotEnoughUpdates.INSTANCE.config.getProfileSpecific(); + if (hidden == null) return; overlayStrings = new ArrayList<>(); HashMap<String, String> states = new HashMap<>(); for (String key : hidden.divanMinesParts.keySet()) { @@ -80,6 +81,7 @@ public class DivanMinesOverlay extends TextOverlay { public void message(String message) { NEUConfig.HiddenProfileSpecific hidden = NotEnoughUpdates.INSTANCE.config.getProfileSpecific(); + if (hidden == null) return; Matcher foundMatcher = foundPattern.matcher(message); Matcher alreadyFoundMatcher = alreadyFoundPattern.matcher(message); Matcher notFoundMatcher = notFoundPattern.matcher(message); |