mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-22 18:45:54 +01:00
Expose the internal current tick
This commit is contained in:
parent
0c71539093
commit
8d036cea01
@ -0,0 +1,41 @@
|
||||
From 078c70f326b5c98a45611ee06bdb1b4d767a4f5f 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 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
|
||||
|
@ -0,0 +1,24 @@
|
||||
From 5d158ba458c8dd5ccb0e16d44fd3b9c97a776734 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Sat, 20 Apr 2019 19:47:34 -0500
|
||||
Subject: [PATCH] Expose the internal current tick
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 7a8ab7d40..105d31906 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2161,5 +2161,10 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
return new com.destroystokyo.paper.profile.CraftPlayerProfile(uuid, name);
|
||||
}
|
||||
+
|
||||
+ @Override
|
||||
+ public int getCurrentTick() {
|
||||
+ return net.minecraft.server.MinecraftServer.currentTick;
|
||||
+ }
|
||||
// Paper end
|
||||
}
|
||||
--
|
||||
2.23.0
|
||||
|
Loading…
Reference in New Issue
Block a user