Paper/Spigot-API-Patches/0185-Expose-the-internal-current-tick.patch
Riley Park 4e958e229f
We're going on an Adventure! (#4842)
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
Co-authored-by: zml <zml@stellardrift.ca>
Co-authored-by: Mariell Hoversholm <proximyst@proximyst.com>
2021-02-21 20:45:33 +01:00

39 lines
1.5 KiB
Diff

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
index 1f5bcda86990d7c336db21d9c927bbf6b1b6d74d..3e2d644806233bb72f2f6637ec6edde4e3bcfdc9 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -1823,6 +1823,10 @@ public final class Bukkit {
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
index 39188fcf95beff906c68a822f6aa5e19ad3ad08c..f107b5658b60e59e9d98bc86a0313f4da201c190 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -1598,5 +1598,12 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
*/
@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
}