testserver/Spigot-API-Patches/0187-Expose-the-internal-cu...

42 lines
1.3 KiB
Diff
Raw Normal View History

From 43f32b7a054b807b1157fd262e2e733e90a1feab 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
index 6658c12b8..b99734068 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
@@ -1657,6 +1657,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
index df37b9ee5..80f9abdca 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
@@ -1448,5 +1448,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
}
--
2.25.1
2019-04-21 00:47:50 +00:00