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
|
2021-05-30 00:56:24 +02:00
|
|
|
index e3304fcc8c4fd176abd3fb7d4b47e5ccb7bdd37f..49bf621a2c0e5e9641b334a42b2769944c991d5d 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
|
2021-05-30 00:56:24 +02:00
|
|
|
@@ -1835,6 +1835,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
|
2021-05-30 00:56:24 +02:00
|
|
|
index 989a732e5ef2053deede245d65fbf99cdf117c5e..e448ae78304974f7664b7ef18568a547833ece9f 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
|
2021-05-30 00:56:24 +02:00
|
|
|
@@ -1609,5 +1609,12 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
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
|
|
|
|
}
|