mirror of
https://github.com/YatopiaMC/Yatopia.git
synced 2024-12-01 15:13:24 +01:00
daedcdd003
Upstream/An Sidestream has released updates that appears to apply and compile correctly This update has NOT been tested by YatopiaMC and as with ANY update, please do your own testing. Paper Changes: b94a99b03 Updated Upstream (CraftBukkit) (#5762) f5cb169e0 [Auto] Updated Upstream (CraftBukkit) 407ad043c Add ElderGuardianAppearanceEvent (#5394) a04ad7bfb Fix invulnerable end crystals: MC-108513 (#5734) c894e8bbb Fix issue with soft despawn distance (#5755) 302e5101a Add BellRevealRaiderEvent (#5729) 34e6b2dc3 editMeta: tighten contract via docs (#5714) db2d501ba Do not print spawn loaded chunks 86ffde038 Add getHandRaised to LivingEntity (#5752) 9072c349a Fix broadcast event and add Adventure broadcast (#5477) Tuinity Changes: f7c4249 Fix dangerous end portal logic 3eda860 Updated Upstream (Paper) Airplane Changes: 3e07ea8 Patch container checks for WildChests compat d04adc9 Updated Upstream (Tuinity) 489bb76 Update gradle 0d5670e Merge pull request #24 from HexedHero/spelling-mistake-lightning c605be6 Fix typo Purpur Changes: d2204a3d Updated Upstream (Paper, Tuinity & Airplane) 2b35782c Fix #364 - isCritical always false 6ab78311 Fix empty shulker boxes disappearing when broken afaf8b4f Updated Upstream (Paper) b97feb78 [ci-skip] readme eb77666a Updated Upstream (Paper) Empirecraft Changes: 105217a9 Move more files out of nms package 548a13f4 Move some server patches out nms package f24d7b4c Updated Paper 99745711 Updated Paper deb9886e Add a fix for piglins picking up too much - SPIGOT-6482 8c662d78 Add javadoc description to reload api 1af9bbc8 Adjust comments on vehicle event patch 2aa479b8 cleanup ItemStack isSimilar api patches f344cb62 Updated Paper dbb49189 Re-add EMC User API a6c40eb2 Updated Paper a57940b2 Remove EMC specific User API patches Origami Changes: d0cdf96 Fix issues with disabling the chunk loading of the feature search 529f5b6 Fix creature type despawn distances not applying 1af8601 Fix Endermen being able to load chunks on teleport
57 lines
1.9 KiB
Diff
57 lines
1.9 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Ivan Pekov <ivan@mrivanplays.com>
|
|
Date: Sun, 27 Sep 2020 18:01:50 +0300
|
|
Subject: [PATCH] Add last tick time API
|
|
|
|
Original patch by:
|
|
Co-authored-by: tr7zw <tr7zw@live.de>
|
|
|
|
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
|
index 194261bf20bb727d207a2429fa59abf0acf61b19..15203139858b09a5ba75545c0c19c89d48419a2c 100644
|
|
--- a/src/main/java/org/bukkit/Bukkit.java
|
|
+++ b/src/main/java/org/bukkit/Bukkit.java
|
|
@@ -1983,4 +1983,14 @@ public final class Bukkit {
|
|
return server.isLagging();
|
|
}
|
|
// Purpur end
|
|
+
|
|
+ // Yatopia start
|
|
+ @Deprecated
|
|
+ public static long getLastTickMs() {
|
|
+ return server.getLastTickMs();
|
|
+ }
|
|
+ @NotNull public static java.time.Duration getLastTickTime() {
|
|
+ return server.getLastTickTime();
|
|
+ }
|
|
+ // Yatopia end
|
|
}
|
|
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
|
index d756eb5ff47611a3edf616387c252e8c75207a21..8bebea38ce408afd7a0c7590625d63535fdb0960 100644
|
|
--- a/src/main/java/org/bukkit/Server.java
|
|
+++ b/src/main/java/org/bukkit/Server.java
|
|
@@ -1771,4 +1771,24 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
|
*/
|
|
boolean isLagging();
|
|
// Purpur end
|
|
+
|
|
+ // Yatopia start
|
|
+ /**
|
|
+ * Returns the time the last tick took in milliseconds.
|
|
+ *
|
|
+ * @return long time value
|
|
+ * @deprecated newer method with java's Duration and a possibility to convert it from millis to something else
|
|
+ */
|
|
+ @Deprecated
|
|
+ default long getLastTickMs() {
|
|
+ return getLastTickTime().toMillis();
|
|
+ }
|
|
+ /**
|
|
+ * Returns the time in {@link java.time.Duration} the last tick took.
|
|
+ *
|
|
+ * @return duration
|
|
+ */
|
|
+ @NotNull
|
|
+ java.time.Duration getLastTickTime();
|
|
+ // Yatopia end
|
|
}
|