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
|
2022-02-12 13:20:33 +00:00
|
|
|
index cf7f8a8f03adcbe466b59ea8b98b527fb54a0803..61877d9d64840408a7aec7bcc2a54779a9e820d8 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
|
2022-02-12 13:20:33 +00:00
|
|
|
@@ -2140,6 +2140,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
|
2022-02-12 13:20:33 +00:00
|
|
|
index 49bcc2edea32ef2b31b9ed5c3a62140bcc81ffc9..73ec2a8541ae95e07e32327ad0fff3a30b091658 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
|
2022-02-12 13:20:33 +00:00
|
|
|
@@ -1875,5 +1875,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
|
|
|
|
}
|