geforkt von Mirrors/Paper
39 Zeilen
1.5 KiB
Diff
39 Zeilen
1.5 KiB
Diff
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
|
|
index 5c7681809a27796e398170fc72bf0a950e52a971..caa3d77b5906a2227f6409a877bd0ba14d05caba 100644
|
|
--- a/src/main/java/org/bukkit/Bukkit.java
|
|
+++ b/src/main/java/org/bukkit/Bukkit.java
|
|
@@ -1975,6 +1975,10 @@ public final class Bukkit {
|
|
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 5162e8b356e73ac41d6f4f5a0ea0efeda85382c7..bf1920857008c272d557f602544009986c3ed284 100644
|
|
--- a/src/main/java/org/bukkit/Server.java
|
|
+++ b/src/main/java/org/bukkit/Server.java
|
|
@@ -1732,5 +1732,12 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
|
*/
|
|
@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
|
|
}
|