mirror of
https://github.com/LeavesMC/Leaves.git
synced 2025-12-29 03:49:10 +00:00
Fix Fakeplayer action command
This commit is contained in:
@@ -443,7 +443,7 @@ index 0000000000000000000000000000000000000000..4c290eb2d4abf9e9b923b8d0878f3193
|
||||
+}
|
||||
diff --git a/src/main/java/top/leavesmc/leaves/command/CommandArgument.java b/src/main/java/top/leavesmc/leaves/command/CommandArgument.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..4d645b317fc6f0803b9288e629bae64bcf2474ce
|
||||
index 0000000000000000000000000000000000000000..2d983fca8dbee8d7a53e6389fed80fa9387e1b7a
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/top/leavesmc/leaves/command/CommandArgument.java
|
||||
@@ -0,0 +1,43 @@
|
||||
@@ -485,9 +485,9 @@ index 0000000000000000000000000000000000000000..4d645b317fc6f0803b9288e629bae64b
|
||||
+ Object[] result = new String[argumentTypes.size()];
|
||||
+ Arrays.fill(result, null);
|
||||
+ for (int i = index, j = 0; i < args.length && j < result.length; i++, j++) {
|
||||
+ result[j] = argumentTypes.get(i).pasre(args[i]);
|
||||
+ result[j] = argumentTypes.get(j).pasre(args[i]);
|
||||
+ }
|
||||
+ return new CommandArgumentResult(new ArrayList<>(List.of(result)));
|
||||
+ return new CommandArgumentResult(new ArrayList<>(Arrays.asList(result)));
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/top/leavesmc/leaves/command/CommandArgumentResult.java b/src/main/java/top/leavesmc/leaves/command/CommandArgumentResult.java
|
||||
|
||||
Reference in New Issue
Block a user