2020-05-06 11:48:49 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2019-04-21 02:47:50 +02: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-06-26 18:20:03 +02:00
|
|
|
index 12603c91046abf1ab58e8b797904b2cdafa7c9af..6a0fee5e81e4d97b624af2718595b63e4d7a95b2 100644
|
2019-04-21 02:47:50 +02:00
|
|
|
--- a/src/main/java/org/bukkit/Bukkit.java
|
|
|
|
+++ b/src/main/java/org/bukkit/Bukkit.java
|
2020-06-26 18:20:03 +02:00
|
|
|
@@ -1689,6 +1689,10 @@ public final class Bukkit {
|
2019-04-21 02:47:50 +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
|
2020-06-26 18:20:03 +02:00
|
|
|
index b46644bc97122814f80a44e6ff0b848f4cf132b7..ea6c86c8979ea6253b00c99b4f9cfcd1621beff0 100644
|
2019-04-21 02:47:50 +02:00
|
|
|
--- a/src/main/java/org/bukkit/Server.java
|
|
|
|
+++ b/src/main/java/org/bukkit/Server.java
|
2020-06-26 18:20:03 +02:00
|
|
|
@@ -1476,5 +1476,12 @@ public interface Server extends PluginMessageRecipient {
|
2019-04-21 02:47:50 +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
|
|
|
|
}
|