2020-08-03 18:48:42 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2020-08-06 19:18:29 +02:00
|
|
|
From: tr7zw <tr7zw@live.de>
|
2020-08-03 18:48:42 +02:00
|
|
|
Date: Sat, 1 Aug 2020 15:54:43 -0500
|
|
|
|
Subject: [PATCH] Add getLastTickMs api
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
2020-08-24 08:08:09 +02:00
|
|
|
index 8d172d58b7c935f608ac49d3376d5b90bdf0abdd..808574e7d40346fd0b923b14b534730cbfd10aae 100644
|
2020-08-03 18:48:42 +02:00
|
|
|
--- a/src/main/java/org/bukkit/Bukkit.java
|
|
|
|
+++ b/src/main/java/org/bukkit/Bukkit.java
|
2020-08-24 08:08:09 +02:00
|
|
|
@@ -1798,4 +1798,10 @@ public final class Bukkit {
|
2020-08-03 18:48:42 +02:00
|
|
|
return server.isLagging();
|
|
|
|
}
|
|
|
|
// Purpur end
|
|
|
|
+
|
|
|
|
+ // Yatopia start
|
|
|
|
+ public static long getLastTickMs() {
|
|
|
|
+ return server.getLastTickMs();
|
|
|
|
+ }
|
|
|
|
+ // Yatopia end
|
|
|
|
}
|
|
|
|
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
2020-08-24 08:08:09 +02:00
|
|
|
index b8f89453ed7771cc92ea6459830675b7a14f0d44..12cb98afc6845a1efdd83ff3389f12d0b3b80a79 100644
|
2020-08-03 18:48:42 +02:00
|
|
|
--- a/src/main/java/org/bukkit/Server.java
|
|
|
|
+++ b/src/main/java/org/bukkit/Server.java
|
2020-08-24 08:08:09 +02:00
|
|
|
@@ -1621,4 +1621,13 @@ public interface Server extends PluginMessageRecipient {
|
2020-08-11 17:38:17 +02:00
|
|
|
*/
|
2020-08-03 18:48:42 +02:00
|
|
|
boolean isLagging();
|
|
|
|
// Purpur end
|
|
|
|
+
|
|
|
|
+ // Yatopia start
|
|
|
|
+ /**
|
|
|
|
+ * Get the ms the last servertick took
|
|
|
|
+ *
|
|
|
|
+ * @return Last ticks ms
|
|
|
|
+ */
|
|
|
|
+ long getLastTickMs();
|
|
|
|
+ // Yatopia end
|
|
|
|
}
|