Simplify SubCommand.invoke with catch clause
Dieser Commit ist enthalten in:
Ursprung
5a2c06232d
Commit
07f401c2e1
@ -94,11 +94,8 @@ class SubCommand {
|
|||||||
objects[0] = commandSenderFunction.apply(commandSender);
|
objects[0] = commandSenderFunction.apply(commandSender);
|
||||||
method.setAccessible(true);
|
method.setAccessible(true);
|
||||||
method.invoke(swCommand, objects);
|
method.invoke(swCommand, objects);
|
||||||
} catch (IllegalAccessException | RuntimeException e) {
|
} catch (IllegalAccessException | RuntimeException | InvocationTargetException e) {
|
||||||
throw new SecurityException(e.getMessage(), e);
|
throw new SecurityException(e.getMessage(), e);
|
||||||
} catch (InvocationTargetException e) {
|
|
||||||
Bukkit.getLogger().log(Level.INFO, e.getMessage(), e);
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren