mirror of
https://github.com/YatopiaMC/Yatopia.git
synced 2024-11-23 02:55:27 +01:00
53 lines
1.4 KiB
Diff
53 lines
1.4 KiB
Diff
From bb86d2fa9a4615aa87855e1ac1c9607e496fbd24 Mon Sep 17 00:00:00 2001
|
|
From: tr7zw <tr7zw@live.de>
|
|
Date: Thu, 5 Mar 2020 21:13:14 +0100
|
|
Subject: [PATCH] Add getLastTickMs() api
|
|
|
|
---
|
|
src/main/java/org/bukkit/Bukkit.java | 8 ++++++++
|
|
src/main/java/org/bukkit/Server.java | 11 +++++++++++
|
|
2 files changed, 19 insertions(+)
|
|
|
|
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
|
index a9c10228e..53589303e 100644
|
|
--- a/src/main/java/org/bukkit/Bukkit.java
|
|
+++ b/src/main/java/org/bukkit/Bukkit.java
|
|
@@ -1712,6 +1712,14 @@ public final class Bukkit {
|
|
return server.getMobGoals();
|
|
}
|
|
// Paper end
|
|
+
|
|
+ // YAPFA start
|
|
+
|
|
+ public static long getLastTickMs() {
|
|
+ return server.getLastTickMs();
|
|
+ }
|
|
+
|
|
+ // YAPFA end
|
|
|
|
@NotNull
|
|
public static Server.Spigot spigot() {
|
|
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
|
index cf20e7541..771827d80 100644
|
|
--- a/src/main/java/org/bukkit/Server.java
|
|
+++ b/src/main/java/org/bukkit/Server.java
|
|
@@ -1504,4 +1504,15 @@ public interface Server extends PluginMessageRecipient {
|
|
@NotNull
|
|
com.destroystokyo.paper.entity.ai.MobGoals getMobGoals();
|
|
// Paper end
|
|
+
|
|
+ // YAPFA start
|
|
+
|
|
+ /**
|
|
+ * Get the ms the last servertick took
|
|
+ *
|
|
+ * @return Last ticks ms
|
|
+ */
|
|
+ long getLastTickMs();
|
|
+
|
|
+ // YAPFA end
|
|
}
|
|
--
|
|
2.25.1.windows.1
|
|
|