From a4d0f528f8e66e22a2a204ab7dba0afe15ef1660 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Fri, 12 Mar 2021 17:24:18 +0100 Subject: [PATCH] Fix InternalCommand Fix InternalTabComplete --- SpigotCore_Main/src/de/steamwar/command/InternalCommand.java | 2 +- .../src/de/steamwar/command/InternalTabComplete.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/SpigotCore_Main/src/de/steamwar/command/InternalCommand.java b/SpigotCore_Main/src/de/steamwar/command/InternalCommand.java index bf0d759..5595992 100644 --- a/SpigotCore_Main/src/de/steamwar/command/InternalCommand.java +++ b/SpigotCore_Main/src/de/steamwar/command/InternalCommand.java @@ -39,8 +39,8 @@ class InternalCommand { boolean invoke(CommandSender commandSender, String[] args) { if (args.length < parameters.length - 1) return false; - Object[] objects = SWCommandUtils.generateArgumentArray(commandSender, parameters, args); try { + Object[] objects = SWCommandUtils.generateArgumentArray(commandSender, method, parameters, args); method.setAccessible(true); method.invoke(swCommand, objects); } catch (IllegalArgumentException | IllegalAccessException e) { diff --git a/SpigotCore_Main/src/de/steamwar/command/InternalTabComplete.java b/SpigotCore_Main/src/de/steamwar/command/InternalTabComplete.java index b6f0d47..44effb6 100644 --- a/SpigotCore_Main/src/de/steamwar/command/InternalTabComplete.java +++ b/SpigotCore_Main/src/de/steamwar/command/InternalTabComplete.java @@ -39,8 +39,8 @@ class InternalTabComplete { SWCommandUtils.TabComplete invoke(CommandSender commandSender, String[] args) { if (args.length < parameters.length - 1) return null; - Object[] objects = SWCommandUtils.generateArgumentArray(commandSender, parameters, args); try { + Object[] objects = SWCommandUtils.generateArgumentArray(commandSender, method, parameters, args); method.setAccessible(true); return (SWCommandUtils.TabComplete) method.invoke(swCommand, objects); } catch (IllegalArgumentException | IllegalAccessException e) {