mirror of
https://github.com/EngineHub/WorldEdit.git
synced 2024-12-27 05:00:08 +08:00
Fixed handling of CommandExceptions thrown by commands.
This commit is contained in:
parent
0ffe0689d1
commit
c58f8f4155
@ -346,6 +346,10 @@ public void executeMethod(Method parent, String[] args,
|
||||
} catch (IllegalAccessException e) {
|
||||
e.printStackTrace();
|
||||
} catch (InvocationTargetException e) {
|
||||
if (e.getCause() instanceof CommandException) {
|
||||
throw (CommandException) e.getCause();
|
||||
}
|
||||
|
||||
throw new WrappedCommandException(e.getCause());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user