2021-06-11 14:02:28 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Aikar <aikar@aikar.co>
|
|
|
|
Date: Mon, 29 Feb 2016 17:24:57 -0600
|
|
|
|
Subject: [PATCH] Add getTPS method
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
2024-07-06 21:19:14 +02:00
|
|
|
index d978c72cdbc10792f852a4ba372518073893d02b..5780003631beae773231afe3afc6b834bfe1f84d 100644
|
2021-06-11 14:02:28 +02:00
|
|
|
--- a/src/main/java/org/bukkit/Bukkit.java
|
|
|
|
+++ b/src/main/java/org/bukkit/Bukkit.java
|
2024-07-06 21:19:14 +02:00
|
|
|
@@ -2108,6 +2108,17 @@ public final class Bukkit {
|
2021-06-11 14:02:28 +02:00
|
|
|
return server.getEntity(uuid);
|
|
|
|
}
|
|
|
|
|
|
|
|
+ // Paper start
|
|
|
|
+ /**
|
|
|
|
+ * Gets the current server TPS
|
|
|
|
+ * @return current server TPS (1m, 5m, 15m in Paper-Server)
|
|
|
|
+ */
|
|
|
|
+ @NotNull
|
|
|
|
+ public static double[] getTPS() {
|
|
|
|
+ return server.getTPS();
|
|
|
|
+ }
|
|
|
|
+ // Paper end
|
|
|
|
+
|
|
|
|
/**
|
|
|
|
* Get the advancement specified by this key.
|
|
|
|
*
|
|
|
|
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
2024-07-06 21:19:14 +02:00
|
|
|
index 8949b8e29ae7f412481291630a5cb7b5b8809842..ba28d9f3213ca4b5f15178dc637bff37a8896edc 100644
|
2021-06-11 14:02:28 +02:00
|
|
|
--- a/src/main/java/org/bukkit/Server.java
|
|
|
|
+++ b/src/main/java/org/bukkit/Server.java
|
2024-07-06 21:19:14 +02:00
|
|
|
@@ -1797,6 +1797,16 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
2021-06-11 14:02:28 +02:00
|
|
|
@Nullable
|
|
|
|
Entity getEntity(@NotNull UUID uuid);
|
|
|
|
|
|
|
|
+ // Paper start
|
|
|
|
+ /**
|
|
|
|
+ * Gets the current server TPS
|
|
|
|
+ *
|
|
|
|
+ * @return current server TPS (1m, 5m, 15m in Paper-Server)
|
|
|
|
+ */
|
|
|
|
+ @NotNull
|
|
|
|
+ public double[] getTPS();
|
|
|
|
+ // Paper end
|
|
|
|
+
|
|
|
|
/**
|
|
|
|
* Get the advancement specified by this key.
|
|
|
|
*
|