From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Bud Gidiere 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 0770736b4b52f325027671b43f74ad038c97ce7f..537e7fc9273b7e4ecc88eaad5b1a69d3864740d0 100644 --- 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 index 6ff5c73f607d1c1a3bc392fda2c0e8b492aab579..09a710dd500e404b382e75b62f1f2533da270ff3 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java @@ -1597,4 +1597,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 }