papermc/patches/api/0186-Expose-the-internal-current-tick.patch

39 lines
1.5 KiB
Diff
Raw Normal View History

2021-06-11 12:02:28 +00:00
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <blake.galbreath@gmail.com>
Date: Sat, 20 Apr 2019 19:47:29 -0500
Subject: [PATCH] Expose the internal current tick
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
2021-11-22 05:21:37 +00:00
index 78c820f40c22af18d72ec95e07a73cd96dfdbd2c..4e910d50131b6ccc21466896b5a4adac8a9aa42b 100644
2021-06-11 12:02:28 +00:00
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
2021-11-22 05:21:37 +00:00
@@ -1966,6 +1966,10 @@ public final class Bukkit {
2021-06-11 12:02:28 +00:00
public static com.destroystokyo.paper.profile.PlayerProfile createProfile(@Nullable UUID uuid, @Nullable String name) {
return server.createProfile(uuid, name);
}
+
+ public static int getCurrentTick() {
+ return server.getCurrentTick();
+ }
// Paper end
@NotNull
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
2021-11-22 05:21:37 +00:00
index b485befe8374773ad44720cc2adad4bbd1ebf424..0de8bd3e9c6b5aca9c65bc9239cf5b223ff0e0a5 100644
2021-06-11 12:02:28 +00:00
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
2021-11-22 05:21:37 +00:00
@@ -1725,5 +1725,12 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
2021-06-11 12:02:28 +00:00
*/
@NotNull
com.destroystokyo.paper.profile.PlayerProfile createProfile(@Nullable UUID uuid, @Nullable String name);
+
+ /**
+ * Get the current internal server tick
+ *
+ * @return Current tick
+ */
+ int getCurrentTick();
// Paper end
}