From 264d5684617fdf1410e4409c7a6df21833d26dc0 Mon Sep 17 00:00:00 2001 From: tr7zw Date: Thu, 5 Mar 2020 21:13:33 +0100 Subject: [PATCH] Add getLastTickMs() api --- src/main/java/net/minecraft/server/MinecraftServer.java | 5 +++++ src/main/java/org/bukkit/craftbukkit/CraftServer.java | 9 +++++++++ src/main/java/org/spigotmc/TicksPerSecondCommand.java | 2 +- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java index 6949761d8b..ca166e498c 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -933,6 +933,8 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant 0 && args[0].equals("mem") && sender.hasPermission("bukkit.command.tpsmemory")) { sender.sendMessage(ChatColor.GOLD + "Current Memory Usage: " + ChatColor.GREEN + ((Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) / (1024 * 1024)) + "/" + (Runtime.getRuntime().totalMemory() / (1024 * 1024)) + " mb (Max: " + (Runtime.getRuntime().maxMemory() / (1024 * 1024)) + " mb)"); if (!hasShownMemoryWarning) { -- 2.25.1.windows.1