From 235d0360daa66f33c3e4b027bc05109173d3e08a Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Wed, 29 Dec 2021 16:55:32 +0000 Subject: [PATCH] Don't wrap Exception thrown upon invalid schematic path inside a RuntimeException Fixes #1506 --- .../main/java/com/sk89q/worldedit/command/UtilityCommands.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/UtilityCommands.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/UtilityCommands.java index 9a7de94a4..1389af7aa 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/UtilityCommands.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/UtilityCommands.java @@ -876,8 +876,7 @@ public class UtilityCommands { } try { if (!MainUtil.isInSubDirectory(root, file)) { - throw new RuntimeException( - new StopExecutionException(TextComponent.of("Invalid path"))); + throw new StopExecutionException(TextComponent.of("Invalid path")); } } catch (IOException ignored) { }