2021-06-11 14:02:28 +02: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
|
2022-03-19 14:39:38 +01:00
|
|
|
index 19771a9a7a212a71f4cad33981c3b72341d80093..0f77744ac6ea1d41f3e8713236bb85ec182f4010 100644
|
2021-06-11 14:02:28 +02:00
|
|
|
--- a/src/main/java/org/bukkit/Bukkit.java
|
|
|
|
+++ b/src/main/java/org/bukkit/Bukkit.java
|
2022-03-19 14:39:38 +01:00
|
|
|
@@ -2150,6 +2150,10 @@ public final class Bukkit {
|
2021-06-11 14:02:28 +02: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
|
2022-03-19 14:39:38 +01:00
|
|
|
index 790c09d8fc67dfe6325faff419be7d980415bad8..fcc48b9a512c756f22075d58021cad23d1ac1091 100644
|
2021-06-11 14:02:28 +02:00
|
|
|
--- a/src/main/java/org/bukkit/Server.java
|
|
|
|
+++ b/src/main/java/org/bukkit/Server.java
|
2022-03-19 14:39:38 +01:00
|
|
|
@@ -1885,5 +1885,12 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
2021-06-11 14:02:28 +02: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
|
|
|
|
}
|