SteamWar/SpigotCore
Archiviert
13
0

Simplify SubCommand.invoke with catch clause

Dieser Commit ist enthalten in:
yoyosource 2021-03-30 09:23:38 +02:00
Ursprung 5a2c06232d
Commit 07f401c2e1

Datei anzeigen

@ -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;
} }