geforkt von Mirrors/Paper
57fdc668fa
The only way to get a map is via its id, which is not a magic value. This implementation isn't going to be changing anytime soon, so it should be undeprecated.
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 08da910016cc55f008acf20070daaa82f3128bf1..9790aef0fe2c7ff0818455b1b3870a560eee8448 100644
|
|
--- a/src/main/java/org/bukkit/Bukkit.java
|
|
+++ b/src/main/java/org/bukkit/Bukkit.java
|
|
@@ -2287,6 +2287,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 e75e02b662cc16c2e76ee38dea3cbc8626e51a3c..9872df17c5b30b876a1423e841db914bf255f9a5 100644
|
|
--- a/src/main/java/org/bukkit/Server.java
|
|
+++ b/src/main/java/org/bukkit/Server.java
|
|
@@ -1986,5 +1986,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
|
|
}
|