Paper/patches/api/0184-Expose-the-internal-current-tick.patch
Jason Penilla 7c55e62abc Fix tests
2022-06-09 16:19:38 -07: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 ba0c757346975af6fae9c0ebd72487395c74170d..346ed194262c045bb12034b1dc949cf9bbbcb4ee 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -2228,6 +2228,10 @@ public final class Bukkit {
public static com.destroystokyo.paper.profile.PlayerProfile createProfileExact(@Nullable UUID uuid, @Nullable String name) {
return server.createProfileExact(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 911b26247b3cd5e80c1f0a904ad3f88761091551..97149dc0142bd910681b8f013803fb3ea9f72dbb 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -1937,5 +1937,12 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
*/
@NotNull
com.destroystokyo.paper.profile.PlayerProfile createProfileExact(@Nullable UUID uuid, @Nullable String name);
+
+ /**
+ * Get the current internal server tick
+ *
+ * @return Current tick
+ */
+ int getCurrentTick();
// Paper end
}