mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-18 20:53:09 +01:00
79b873c901
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 64c8bd39 #679: Add getHideOnlinePlayers b991b6c7 #677: Add "Allow Server Listings" API 4e9f199a SPIGOT-6801: Wrong BlockData classes in Material enum for SOUL_FIRE and SOUL_TORCH CraftBukkit Changes: 37e63e63 Fix loading / creating secondary worlds (nether/end) 4bf7f33c #956: Add getHideOnlinePlayers d181e1ed Fix serializing unhandled NBT + add unit test with unhandled NBT aebb79e3 #954: Add "Allow Server Listings" API 7c4707e4 #955: Add test for BlockData class of Material Spigot Changes: 16c0cb41 Rebuild patches
49 lines
1.5 KiB
Diff
49 lines
1.5 KiB
Diff
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
|
|
index b8e63b2c2870dd2eb9d31f51590b9b958de6a17f..06d84ca5ce794d264dc50b83283bc09e550b8cb7 100644
|
|
--- a/src/main/java/org/bukkit/Bukkit.java
|
|
+++ b/src/main/java/org/bukkit/Bukkit.java
|
|
@@ -1671,6 +1671,17 @@ public final class Bukkit {
|
|
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
|
|
index f048278df8abb313a319136e8b697d9c87fb5d0a..c076053238cd6f1787834ee505497d66a17d3769 100644
|
|
--- a/src/main/java/org/bukkit/Server.java
|
|
+++ b/src/main/java/org/bukkit/Server.java
|
|
@@ -1414,6 +1414,16 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
|
@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.
|
|
*
|