Paper/patches/unapplied/api/0183-Expose-the-internal-current-tick.patch
2022-06-07 19:03:07 +02:00

39 Zeilen
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 d9f245ec7998655116c485b5607a130cb443765e..f6a862fcf269865eacc67088833bfdd09b661654 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -2196,6 +2196,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 102ce4e488d5b6fd4a19766e9fa02d29075b2c33..ad1d73940908f4f20a4944e81b186739fded20ab 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -1927,5 +1927,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
}