From 29601ef296db4edd5110fa33897b9b9933ec98c7 Mon Sep 17 00:00:00 2001 From: Lumine1909 <133463833+Lumine1909@users.noreply.github.com> Date: Sat, 5 Oct 2024 02:23:04 -0400 Subject: [PATCH] Fix action argument check(#353) --- patches/server/0010-Fakeplayer-support.patch | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/patches/server/0010-Fakeplayer-support.patch b/patches/server/0010-Fakeplayer-support.patch index 7891cf08..fa40f517 100644 --- a/patches/server/0010-Fakeplayer-support.patch +++ b/patches/server/0010-Fakeplayer-support.patch @@ -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; @@ -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) {