aboutsummaryrefslogtreecommitdiffhomepage
path: root/Spigot-API-Patches
diff options
context:
space:
mode:
authorWilliam Blake Galbreath <[email protected]>2019-04-20 19:47:50 -0500
committerShane Freeder <[email protected]>2019-10-30 18:10:42 +0000
commit8d036cea010b0c104ff324e2eae30965436b000f (patch)
tree751e9942c53c75b9e6eca2f7f9a447ab0254497f /Spigot-API-Patches
parent0c715390939bb2b46319fec03a224fdc2038b739 (diff)
downloadPaper-8d036cea010b0c104ff324e2eae30965436b000f.tar.gz
Paper-8d036cea010b0c104ff324e2eae30965436b000f.zip
Expose the internal current tick
Diffstat (limited to 'Spigot-API-Patches')
-rw-r--r--Spigot-API-Patches/0187-Expose-the-internal-current-tick.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/Spigot-API-Patches/0187-Expose-the-internal-current-tick.patch b/Spigot-API-Patches/0187-Expose-the-internal-current-tick.patch
new file mode 100644
index 0000000000..727d4ba15c
--- /dev/null
+++ b/Spigot-API-Patches/0187-Expose-the-internal-current-tick.patch
@@ -0,0 +1,41 @@
+From 078c70f326b5c98a45611ee06bdb1b4d767a4f5f Mon Sep 17 00:00:00 2001
+From: William Blake Galbreath <[email protected]>
+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 6db69159..231bc6e3 100644
+--- a/src/main/java/org/bukkit/Bukkit.java
++++ b/src/main/java/org/bukkit/Bukkit.java
+@@ -1599,6 +1599,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 27d3b5ad..31470479 100644
+--- a/src/main/java/org/bukkit/Server.java
++++ b/src/main/java/org/bukkit/Server.java
+@@ -1398,5 +1398,12 @@ public interface Server extends PluginMessageRecipient {
+ */
+ @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
+ }
+--
+2.23.0
+