mirror of
https://github.com/LeavesMC/Leaves.git
synced 2025-12-19 14:59:32 +00:00
--------- Co-authored-by: violetc <58360096+s-yh-china@users.noreply.github.com> Co-authored-by: Fortern <blueten.ki@gmail.com> Co-authored-by: MC_XiaoHei <xor7xiaohei@gmail.com> Co-authored-by: Helvetica Volubi <88063803+Suisuroru@users.noreply.github.com> Co-authored-by: MC_XiaoHei <xiaohei.xor7@outlook.com>
45 lines
1.6 KiB
Diff
45 lines
1.6 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: violetc <58360096+s-yh-china@users.noreply.github.com>
|
|
Date: Wed, 27 Jul 2022 15:30:34 +0800
|
|
Subject: [PATCH] Add fakeplayer api
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
|
index c9ea6559f809a6732588b8908001807be3d91196..fe30de1f0a7fc7112466b6eb2e5813f39259c3b6 100644
|
|
--- a/src/main/java/org/bukkit/Bukkit.java
|
|
+++ b/src/main/java/org/bukkit/Bukkit.java
|
|
@@ -3007,4 +3007,15 @@ public final class Bukkit {
|
|
public static void restart() {
|
|
server.restart();
|
|
}
|
|
+
|
|
+ // Leaves start - Bot API
|
|
+ /**
|
|
+ * Returns a bot manager.
|
|
+ *
|
|
+ * @return Bot Manager
|
|
+ */
|
|
+ public static @NotNull org.leavesmc.leaves.entity.BotManager getBotManager() {
|
|
+ return server.getBotManager();
|
|
+ }
|
|
+ // Leaves end - Bot API
|
|
}
|
|
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
|
index ed899c4cb4b5261ceff56bbc9ca806e20904508e..a5370832380e93cf029588caeb8e29e03cc52db8 100644
|
|
--- a/src/main/java/org/bukkit/Server.java
|
|
+++ b/src/main/java/org/bukkit/Server.java
|
|
@@ -2716,4 +2716,13 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
|
*/
|
|
void allowPausing(@NotNull org.bukkit.plugin.Plugin plugin, boolean value);
|
|
// Paper end - API to check if the server is sleeping
|
|
+
|
|
+ // Leaves start - Bot API
|
|
+ /**
|
|
+ * Returns a bot manager.
|
|
+ *
|
|
+ * @return Bot Manager
|
|
+ */
|
|
+ @NotNull org.leavesmc.leaves.entity.BotManager getBotManager();
|
|
+ // Leaves end - Bot API
|
|
}
|