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-11 17:38:17 +02:00
|
|
|
index 59787c474f1a17dff156e74107f880ac083a7cb3..74bb5aa790d072c130a05d0e59afdb1cbf359440 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
|
|
|
|
@@ -1787,4 +1787,10 @@ public final class Bukkit {
|
|
|
|
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-13 17:53:32 +02:00
|
|
|
index e5170b299bb4252a7910c1aa5a607dbc3b30a0d1..bac4710b98f993875d52548b9fd1538f821fb866 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-13 17:53:32 +02:00
|
|
|
@@ -1612,4 +1612,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
|
|
|
|
}
|