mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-29 22:13:42 +01:00
77b05b9c8e
Upstream has released updates that appears 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: 6a4242cb #468: Allow delegation of certain elements to Vanilla when using a custom ChunkGenerator c6697f90 SPIGOT-5559: Add EntityPotionEffectEvent causes for PATROL_CAPTAIN and WITHER_ROSE 9c1fa040 #467: Add method to remove a recipe by its key 3961d1aa Add nb-configuration.xml to .gitignore CraftBukkit Changes:d70084e5
Remove unused seed in CustomChunkGenerator8a66d4c7
#619: Allow delegation of certain elements to Vanilla when using a custom ChunkGeneratorc2dc19d3
Craftbukkit -> CraftBukkitae45e092
SPIGOT-5559: Add EntityPotionEffectEvent causes for bee, raiders and wither rose00980376
#618: Add method to remove a recipe by its key Spigot Changes: c574e08b Rebuild patches 13c24cc4 Rebuild patches
53 lines
1.4 KiB
Diff
53 lines
1.4 KiB
Diff
From 9a5fb9b80a46a450067b0620831174013dd92ad1 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 279236a45..3faccfea7 100644
|
|
--- a/src/main/java/org/bukkit/Bukkit.java
|
|
+++ b/src/main/java/org/bukkit/Bukkit.java
|
|
@@ -1325,6 +1325,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 d00a289de..51efc5f71 100644
|
|
--- a/src/main/java/org/bukkit/Server.java
|
|
+++ b/src/main/java/org/bukkit/Server.java
|
|
@@ -1108,6 +1108,16 @@ public interface Server extends PluginMessageRecipient {
|
|
@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.
|
|
*
|
|
--
|
|
2.25.0
|
|
|