aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0296-Expose-the-internal-current-tick.patch
blob: b6f11107b66fd5c210dde6d7d19a5fa26fc9c9e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
From 0000000000000000000000000000000000000000 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 eb178edff9fa0d2be549e2fa62a8ddfd7fd73f83..383f38cd8436fa8efaff53d235b0ad9f757c5c0b 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2879,5 +2879,10 @@ public final class CraftServer implements Server {
         profile.getGameProfile().getProperties().putAll(((CraftPlayer) player).getHandle().getGameProfile().getProperties());
         return profile;
     }
+
+    @Override
+    public int getCurrentTick() {
+        return net.minecraft.server.MinecraftServer.currentTick;
+    }
     // Paper end
 }