mirror of
https://github.com/YatopiaMC/Yatopia.git
synced 2024-11-25 12:05:14 +01:00
46 lines
1.4 KiB
Diff
46 lines
1.4 KiB
Diff
From 0000000000000000000000000000000000000000 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
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
|
index 62cc1c74c11f56dcbd1e24e9c5478497742e6351..c5d497cb33ecc65c256a39b72453a135bb67d205 100644
|
|
--- a/src/main/java/org/bukkit/Bukkit.java
|
|
+++ b/src/main/java/org/bukkit/Bukkit.java
|
|
@@ -1771,6 +1771,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 46c4d98ce32a0b1d8cfd391f2c7a9566a045cb55..eec88dfd1f7d2c9a46dc6d623f87c01420b94212 100644
|
|
--- a/src/main/java/org/bukkit/Server.java
|
|
+++ b/src/main/java/org/bukkit/Server.java
|
|
@@ -1555,4 +1555,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
|
|
}
|