SteamWar/SpigotCore
Archiviert
13
0

Fix InternalCommand

Fix InternalTabComplete
Dieser Commit ist enthalten in:
yoyosource 2021-03-12 17:24:18 +01:00
Ursprung bba1c1fbf7
Commit a4d0f528f8
2 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen

Datei anzeigen

@ -39,8 +39,8 @@ class InternalCommand {
boolean invoke(CommandSender commandSender, String[] args) { boolean invoke(CommandSender commandSender, String[] args) {
if (args.length < parameters.length - 1) return false; if (args.length < parameters.length - 1) return false;
Object[] objects = SWCommandUtils.generateArgumentArray(commandSender, parameters, args);
try { try {
Object[] objects = SWCommandUtils.generateArgumentArray(commandSender, method, parameters, args);
method.setAccessible(true); method.setAccessible(true);
method.invoke(swCommand, objects); method.invoke(swCommand, objects);
} catch (IllegalArgumentException | IllegalAccessException e) { } catch (IllegalArgumentException | IllegalAccessException e) {

Datei anzeigen

@ -39,8 +39,8 @@ class InternalTabComplete {
SWCommandUtils.TabComplete invoke(CommandSender commandSender, String[] args) { SWCommandUtils.TabComplete invoke(CommandSender commandSender, String[] args) {
if (args.length < parameters.length - 1) return null; if (args.length < parameters.length - 1) return null;
Object[] objects = SWCommandUtils.generateArgumentArray(commandSender, parameters, args);
try { try {
Object[] objects = SWCommandUtils.generateArgumentArray(commandSender, method, parameters, args);
method.setAccessible(true); method.setAccessible(true);
return (SWCommandUtils.TabComplete) method.invoke(swCommand, objects); return (SWCommandUtils.TabComplete) method.invoke(swCommand, objects);
} catch (IllegalArgumentException | IllegalAccessException e) { } catch (IllegalArgumentException | IllegalAccessException e) {