Skip to content

Commit

Permalink
New action
Browse files Browse the repository at this point in the history
  • Loading branch information
s-yh-china committed Sep 8, 2024
1 parent 1be9429 commit 1c21096
Show file tree
Hide file tree
Showing 2 changed files with 239 additions and 297 deletions.
28 changes: 4 additions & 24 deletions patches/api/0003-Add-fakeplayer-api.patch
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ index 594deedd08c3b3255fe6838471d945759f09a182..6fa638198f75458177af795f00250ce9
}
diff --git a/src/main/java/org/leavesmc/leaves/entity/Bot.java b/src/main/java/org/leavesmc/leaves/entity/Bot.java
new file mode 100644
index 0000000000000000000000000000000000000000..922ca5b27bc0dd443d635646f37f879559cc0252
index 0000000000000000000000000000000000000000..f9fa75d2b83e1a59501db9c9eb38f1159ecc10f9
--- /dev/null
+++ b/src/main/java/org/leavesmc/leaves/entity/Bot.java
@@ -0,0 +1,51 @@
@@ -0,0 +1,33 @@
+package org.leavesmc.leaves.entity;
+
+import org.bukkit.entity.Player;
Expand Down Expand Up @@ -99,41 +99,21 @@ index 0000000000000000000000000000000000000000..922ca5b27bc0dd443d635646f37f8795
+
+ @Nullable
+ public UUID getCreatePlayerUUID();
+
+ /**
+ * Sets the fakeplayer action with args.
+ *
+ * @param action action name
+ * @param player player who create this action
+ * @param args passed action arguments
+ */
+ public boolean setBotAction(@NotNull String action, @NotNull Player player, @NotNull String[] args);
+
+ /**
+ * Sets the fakeplayer action with args.
+ *
+ * @param action leaves bot action
+ * @param player player who create this action
+ * @param args passed action arguments
+ */
+ public boolean setBotAction(@NotNull LeavesBotAction action, @NotNull Player player, @NotNull String[] args);
+}
diff --git a/src/main/java/org/leavesmc/leaves/entity/BotManager.java b/src/main/java/org/leavesmc/leaves/entity/BotManager.java
new file mode 100644
index 0000000000000000000000000000000000000000..457395381d1d78eb53f307d4465ea520c1aa57fd
index 0000000000000000000000000000000000000000..05c55d5c7cb27fb8f855b04a6d3c0e1e99d2efc9
--- /dev/null
+++ b/src/main/java/org/leavesmc/leaves/entity/BotManager.java
@@ -0,0 +1,58 @@
@@ -0,0 +1,56 @@
+package org.leavesmc.leaves.entity;
+
+import org.bukkit.Location;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+import org.leavesmc.leaves.entity.botaction.CustomBotAction;
+
+import java.util.Collection;
+import java.util.UUID;
+import java.util.function.Consumer;
+
+/**
+ * Simple fakeplayer manager
Expand Down
Loading

0 comments on commit 1c21096

Please sign in to comment.