From c974622ac48bbe92621f6297e2eb7cec7df1e17a Mon Sep 17 00:00:00 2001 From: DeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com> Date: Sun, 22 Aug 2021 19:54:24 +0200 Subject: o no null --- .../github/moulberry/notenoughupdates/overlays/AutomatonOverlay.java | 4 +++- .../github/moulberry/notenoughupdates/overlays/DivanMinesOverlay.java | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'src/main/java') 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 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 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); -- cgit