From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: William Blake Galbreath 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 2f023dcab9fe1ea220ba04e575bb5efe78adbd45..5d927fe08057d7fe2016f5b019dbbaa647b3ad0e 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java @@ -2513,6 +2513,10 @@ public final class Bukkit { public static com.destroystokyo.paper.profile.PlayerProfile createProfileExact(@Nullable UUID uuid, @Nullable String name) { return server.createProfileExact(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 6d72b50b12315caf29842b5cf52e67715de8877d..309191a5346ed9b17cf8f3aac9d587400972fda6 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java @@ -2190,5 +2190,12 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi */ @NotNull com.destroystokyo.paper.profile.PlayerProfile createProfileExact(@Nullable UUID uuid, @Nullable String name); + + /** + * Get the current internal server tick + * + * @return Current tick + */ + int getCurrentTick(); // Paper end }