Skip to content

Commit

Permalink
Fix fakeplayer command and remove
Browse files Browse the repository at this point in the history
  • Loading branch information
s-yh-china committed Jul 23, 2023
1 parent f8c0e47 commit c4aa610
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions patches/server/0008-Fakeplayer-support.patch
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ index dd6c1d304914b9387da4b741707878ee1fe38935..8dbc01120e7590bd2c7d3a29e96987ce
public static void load(final YamlConfiguration config) {
diff --git a/src/main/java/top/leavesmc/leaves/bot/BotCommand.java b/src/main/java/top/leavesmc/leaves/bot/BotCommand.java
new file mode 100644
index 0000000000000000000000000000000000000000..4f0b8047bab85d44773cb8843e1affce6cfc1a40
index 0000000000000000000000000000000000000000..876060f77f6d986b0e8e0ecd5a7782dd77c21f58
--- /dev/null
+++ b/src/main/java/top/leavesmc/leaves/bot/BotCommand.java
@@ -0,0 +1,254 @@
Expand Down Expand Up @@ -469,10 +469,10 @@ index 0000000000000000000000000000000000000000..4f0b8047bab85d44773cb8843e1affce
+ }
+
+ try {
+ World world = Bukkit.getWorld(args[2]);
+ double x = Double.parseDouble(args[3]);
+ double y = Double.parseDouble(args[4]);
+ double z = Double.parseDouble(args[5]);
+ World world = Bukkit.getWorld(args[3]);
+ double x = Double.parseDouble(args[4]);
+ double y = Double.parseDouble(args[5]);
+ double z = Double.parseDouble(args[6]);
+
+ if (world != null) {
+ ServerBot.createBot(new Location(world, x, y, z), args[1], args[2], (serverBot -> {}));
Expand Down Expand Up @@ -1071,10 +1071,10 @@ index 0000000000000000000000000000000000000000..daaece30b2a3983f1cc9ee9a851e8f37
+}
diff --git a/src/main/java/top/leavesmc/leaves/bot/ServerBot.java b/src/main/java/top/leavesmc/leaves/bot/ServerBot.java
new file mode 100644
index 0000000000000000000000000000000000000000..a80777a9b2b6f5cb57671e722b29e60cd83b7a2f
index 0000000000000000000000000000000000000000..c8e6235e0b35036c75c11df0a7c9bc62a71b1804
--- /dev/null
+++ b/src/main/java/top/leavesmc/leaves/bot/ServerBot.java
@@ -0,0 +1,643 @@
@@ -0,0 +1,642 @@
+package top.leavesmc.leaves.bot;
+
+import com.google.common.collect.Lists;
Expand Down Expand Up @@ -1694,7 +1694,6 @@ index 0000000000000000000000000000000000000000..a80777a9b2b6f5cb57671e722b29e60c
+ Iterator<ServerBot> iterator = bots.iterator();
+ while (iterator.hasNext()) {
+ ServerBot bot = iterator.next();
+ iterator.remove();
+ bot.die(bot.damageSources().fellOutOfWorld());
+ }
+ return true;
Expand Down

0 comments on commit c4aa610

Please sign in to comment.