diff --git a/src/main/java/com/jelly/farmhelperv2/feature/impl/MovRecPlayer.java b/src/main/java/com/jelly/farmhelperv2/feature/impl/MovRecPlayer.java index 14ea6655..14793040 100644 --- a/src/main/java/com/jelly/farmhelperv2/feature/impl/MovRecPlayer.java +++ b/src/main/java/com/jelly/farmhelperv2/feature/impl/MovRecPlayer.java @@ -123,6 +123,15 @@ public void playRandomRecording(String pattern) { try { List resourceFiles = getResourceFiles(); + if (resourceFiles == null) { + if (FailsafeManager.getInstance().triggeredFailsafe.isPresent()) { + LogUtils.sendError("Resource folder not found! Report this to #bug-reports!"); + } + stop(); + resetStatesAfterMacroDisabled(); + return; + } + for (String file : resourceFiles) { if (file.contains(pattern)) { matchingFiles.add(file); @@ -367,7 +376,7 @@ private static List getResourceFiles() throws IOException, URISyntaxExce URL resourceFolder = classLoader.getResource("farmhelper/movrec"); if (resourceFolder == null) { - LogUtils.sendError("Resource folder not found! Report this to #bug-reports!"); + return null; } URI uri = resourceFolder.toURI();