Skip to content

Commit

Permalink
Fix action argument check(LeavesMC#353)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lumine1909 committed Oct 5, 2024
1 parent 95e6661 commit 29601ef
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions patches/server/0010-Fakeplayer-support.patch
Original file line number Diff line number Diff line change
Expand Up @@ -626,10 +626,10 @@ index 4632eb883e9f5efde520ee543bcad25827c0da2c..d710803137a325f34e0628405d5ddfd0
return event;
diff --git a/src/main/java/org/leavesmc/leaves/bot/BotCommand.java b/src/main/java/org/leavesmc/leaves/bot/BotCommand.java
new file mode 100644
index 0000000000000000000000000000000000000000..789ad3dd37baf80ac5597a37464cbbaceeb55d70
index 0000000000000000000000000000000000000000..1f8ce23483ba5220043a9c9d7eb857572c9fb8d2
--- /dev/null
+++ b/src/main/java/org/leavesmc/leaves/bot/BotCommand.java
@@ -0,0 +1,543 @@
@@ -0,0 +1,544 @@
+package org.leavesmc.leaves.bot;
+
+import net.kyori.adventure.text.Component;
Expand Down Expand Up @@ -1022,7 +1022,8 @@ index 0000000000000000000000000000000000000000..789ad3dd37baf80ac5597a37464cbbac
+ newAction = action.create();
+ newAction.loadCommand(player.getHandle(), action.getArgument().parse(0, realArgs));
+ }
+ } catch (IllegalArgumentException ignore) {
+ } catch (IllegalArgumentException e) {
+ newAction = null;
+ }
+
+ if (newAction == null) {
Expand Down

0 comments on commit 29601ef

Please sign in to comment.