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 7b29a19610dbdc99e3662f70a8a291e6203edd1a..21f7d4c0e62058df9e8e0d37886e24649a7fab67 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java @@ -2525,6 +2525,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 75b3295a5544626d28c57b317d95db90722de719..5889209e9855d26f07d4cb4b8f9d448fd31e4c87 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java @@ -2200,5 +2200,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 }