diff options
author | DeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com> | 2021-08-22 19:54:24 +0200 |
---|---|---|
committer | DeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com> | 2021-08-22 19:54:24 +0200 |
commit | c974622ac48bbe92621f6297e2eb7cec7df1e17a (patch) | |
tree | ac763ac0ae4150f4ae0a468d2af97815f1fc3116 /src/main/java/io | |
parent | b4f6ba2cffcf4c9e1a91e3923c4603b581980f29 (diff) | |
download | NotEnoughUpdates-c974622ac48bbe92621f6297e2eb7cec7df1e17a.tar.gz NotEnoughUpdates-c974622ac48bbe92621f6297e2eb7cec7df1e17a.tar.bz2 NotEnoughUpdates-c974622ac48bbe92621f6297e2eb7cec7df1e17a.zip |
o no null
Diffstat (limited to 'src/main/java/io')
-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); |