2020-02-02 11:53:48 +00:00
|
|
|
From a4dde4633566bd37253986617541e91a46ac204f Mon Sep 17 00:00:00 2001
|
2019-04-21 00:47:50 +00:00
|
|
|
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
|
2020-02-02 11:53:48 +00:00
|
|
|
index 93de987d5..355bd2e22 100644
|
2019-04-21 00:47:50 +00:00
|
|
|
--- a/src/main/java/org/bukkit/Bukkit.java
|
|
|
|
+++ b/src/main/java/org/bukkit/Bukkit.java
|
2020-02-02 11:53:48 +00:00
|
|
|
@@ -1613,6 +1613,10 @@ public final class Bukkit {
|
2019-04-21 00:47:50 +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
|
2020-02-02 11:53:48 +00:00
|
|
|
index 2733793a5..98e7ba900 100644
|
2019-04-21 00:47:50 +00:00
|
|
|
--- a/src/main/java/org/bukkit/Server.java
|
|
|
|
+++ b/src/main/java/org/bukkit/Server.java
|
2020-02-02 11:53:48 +00:00
|
|
|
@@ -1408,5 +1408,12 @@ public interface Server extends PluginMessageRecipient {
|
2019-04-21 00:47:50 +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
|
|
|
|
}
|
|
|
|
--
|
2020-01-28 19:43:57 +00:00
|
|
|
2.25.0
|
2019-04-21 00:47:50 +00:00
|
|
|
|