mirror of
https://github.com/YatopiaMC/Yatopia.git
synced 2024-11-26 20:55:30 +01:00
e1a085de4c
Fixes #145
40 lines
1.2 KiB
Diff
40 lines
1.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: tr7zw <tr7zw@live.de>
|
|
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
|
|
index 8d172d58b7c935f608ac49d3376d5b90bdf0abdd..808574e7d40346fd0b923b14b534730cbfd10aae 100644
|
|
--- a/src/main/java/org/bukkit/Bukkit.java
|
|
+++ b/src/main/java/org/bukkit/Bukkit.java
|
|
@@ -1798,4 +1798,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
|
|
index b8f89453ed7771cc92ea6459830675b7a14f0d44..12cb98afc6845a1efdd83ff3389f12d0b3b80a79 100644
|
|
--- a/src/main/java/org/bukkit/Server.java
|
|
+++ b/src/main/java/org/bukkit/Server.java
|
|
@@ -1621,4 +1621,13 @@ public interface Server extends PluginMessageRecipient {
|
|
*/
|
|
boolean isLagging();
|
|
// Purpur end
|
|
+
|
|
+ // Yatopia start
|
|
+ /**
|
|
+ * Get the ms the last servertick took
|
|
+ *
|
|
+ * @return Last ticks ms
|
|
+ */
|
|
+ long getLastTickMs();
|
|
+ // Yatopia end
|
|
}
|