Remove Tuinity patches (you will be missed)

This commit is contained in:
William Blake Galbreath
2020-03-29 15:13:05 -05:00
parent a8aa1994fc
commit 902a3091e2
147 changed files with 370 additions and 10654 deletions

View File

@@ -0,0 +1,69 @@
From 9d3f33b35ebc4ff79bff98b87904592581b3ebce Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
Date: Thu, 30 Jan 2020 00:41:08 -0600
Subject: [PATCH] Add tick times API
---
src/main/java/org/bukkit/Bukkit.java | 21 +++++++++++++++++++++
src/main/java/org/bukkit/Server.java | 17 +++++++++++++++++
2 files changed, 38 insertions(+)
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index 3a60094a1..6935cf272 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -1664,4 +1664,25 @@ public final class Bukkit {
public static Server.Spigot spigot() {
return server.spigot();
}
+
+ // Purpur start
+ /**
+ * Get a sample of the servers last tick times (in nanos)
+ *
+ * @return A sample of the servers last tick times (in nanos)
+ */
+ @NotNull
+ public static long[] getTickTimes() {
+ return server.getTickTimes();
+ }
+
+ /**
+ * Get the average tick time (in millis)
+ *
+ * @return Average tick time (in millis)
+ */
+ public static double getAverageTickTime() {
+ return server == null ? 0D : server.getAverageTickTime();
+ }
+ // Purpur end
}
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index e8b2fe0c2..9d306c084 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -1465,4 +1465,21 @@ public interface Server extends PluginMessageRecipient {
*/
int getCurrentTick();
// Paper end
+
+ // Purpur start
+ /**
+ * Get a sample of the servers last tick times (in nanos)
+ *
+ * @return A sample of the servers last tick times (in nanos)
+ */
+ @NotNull
+ long[] getTickTimes();
+
+ /**
+ * Get the average tick time (in millis)
+ *
+ * @return Average tick time (in millis)
+ */
+ double getAverageTickTime();
+ // Purpur end
}
--
2.24.0