9
0
mirror of https://github.com/LeavesMC/Leaves.git synced 2025-12-22 16:39:30 +00:00

Fix custom bot action API

This commit is contained in:
violetc
2023-07-23 13:30:31 +08:00
parent ced4188de3
commit f8c0e478d8
2 changed files with 19 additions and 12 deletions

View File

@@ -217,14 +217,15 @@ index 0000000000000000000000000000000000000000..f2258027b2ed4bfcf7feda2e9075b1a1
+}
diff --git a/src/main/java/top/leavesmc/leaves/entity/botaction/CustomBotAction.java b/src/main/java/top/leavesmc/leaves/entity/botaction/CustomBotAction.java
new file mode 100644
index 0000000000000000000000000000000000000000..4795a9fec1aba613ad86d76d4f23d920fa2ba082
index 0000000000000000000000000000000000000000..7abf4eef22e40468929e724ebc07a97b0b2a05f3
--- /dev/null
+++ b/src/main/java/top/leavesmc/leaves/entity/botaction/CustomBotAction.java
@@ -0,0 +1,51 @@
@@ -0,0 +1,52 @@
+package top.leavesmc.leaves.entity.botaction;
+
+import org.bukkit.entity.Player;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+import top.leavesmc.leaves.entity.Bot;
+
+import java.util.List;
@@ -249,7 +250,7 @@ index 0000000000000000000000000000000000000000..4795a9fec1aba613ad86d76d4f23d920
+ * @param args passed action arguments
+ * @return a new action instance with given args
+ */
+ public CustomBotAction getNew(Player player, String[] args);
+ public @Nullable CustomBotAction getNew(Player player, String[] args);
+
+ /**
+ * Requests a list of possible completions for a action argument.