Don't wrap Exception thrown upon invalid schematic path inside a RuntimeException

Fixes #1506
This commit is contained in:
dordsor21
2021-12-29 16:55:32 +00:00
parent 52fa44516e
commit 235d0360da

View File

@@ -876,8 +876,7 @@ public class UtilityCommands {
} }
try { try {
if (!MainUtil.isInSubDirectory(root, file)) { if (!MainUtil.isInSubDirectory(root, file)) {
throw new RuntimeException( throw new StopExecutionException(TextComponent.of("Invalid path"));
new StopExecutionException(TextComponent.of("Invalid path")));
} }
} catch (IOException ignored) { } catch (IOException ignored) {
} }