aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/api/0167-Server-Tick-Events.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/api/0167-Server-Tick-Events.patch')
-rw-r--r--patches/api/0167-Server-Tick-Events.patch22
1 files changed, 10 insertions, 12 deletions
diff --git a/patches/api/0167-Server-Tick-Events.patch b/patches/api/0167-Server-Tick-Events.patch
index cc46a9f29a..fc84bb269f 100644
--- a/patches/api/0167-Server-Tick-Events.patch
+++ b/patches/api/0167-Server-Tick-Events.patch
@@ -7,20 +7,21 @@ Fires event at start and end of a server tick
diff --git a/src/main/java/com/destroystokyo/paper/event/server/ServerTickEndEvent.java b/src/main/java/com/destroystokyo/paper/event/server/ServerTickEndEvent.java
new file mode 100644
-index 0000000000000000000000000000000000000000..17e9f39ce1cc7489e936c96f95b8b0579528b222
+index 0000000000000000000000000000000000000000..15a177ce555ed329988d97a9f0b5d9c71aea18fb
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/server/ServerTickEndEvent.java
-@@ -0,0 +1,62 @@
+@@ -0,0 +1,61 @@
+package com.destroystokyo.paper.event.server;
+
+import org.bukkit.event.Event;
+import org.bukkit.event.HandlerList;
+import org.jetbrains.annotations.ApiStatus;
-+import org.jetbrains.annotations.NotNull;
++import org.jspecify.annotations.NullMarked;
+
+/**
+ * Called when the server has finished ticking the main loop
+ */
++@NullMarked
+public class ServerTickEndEvent extends Event {
+
+ private static final HandlerList HANDLER_LIST = new HandlerList();
@@ -30,7 +31,7 @@ index 0000000000000000000000000000000000000000..17e9f39ce1cc7489e936c96f95b8b057
+ private final long timeEnd;
+
+ @ApiStatus.Internal
-+ public ServerTickEndEvent(int tickNumber, double tickDuration, long timeRemaining) {
++ public ServerTickEndEvent(final int tickNumber, final double tickDuration, final long timeRemaining) {
+ this.tickNumber = tickNumber;
+ this.tickDuration = tickDuration;
+ this.timeEnd = System.nanoTime() + timeRemaining;
@@ -63,29 +64,28 @@ index 0000000000000000000000000000000000000000..17e9f39ce1cc7489e936c96f95b8b057
+ return this.timeEnd - System.nanoTime();
+ }
+
-+ @NotNull
+ public HandlerList getHandlers() {
+ return HANDLER_LIST;
+ }
+
-+ @NotNull
+ public static HandlerList getHandlerList() {
+ return HANDLER_LIST;
+ }
+}
diff --git a/src/main/java/com/destroystokyo/paper/event/server/ServerTickStartEvent.java b/src/main/java/com/destroystokyo/paper/event/server/ServerTickStartEvent.java
new file mode 100644
-index 0000000000000000000000000000000000000000..fb5bbfffea8b883e4c8769484a2b64dd895cb617
+index 0000000000000000000000000000000000000000..7c15e6487e17b3255e2428d73aef344ee32a43fd
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/server/ServerTickStartEvent.java
-@@ -0,0 +1,35 @@
+@@ -0,0 +1,34 @@
+package com.destroystokyo.paper.event.server;
+
+import org.bukkit.event.Event;
+import org.bukkit.event.HandlerList;
+import org.jetbrains.annotations.ApiStatus;
-+import org.jetbrains.annotations.NotNull;
++import org.jspecify.annotations.NullMarked;
+
++@NullMarked
+public class ServerTickStartEvent extends Event {
+
+ private static final HandlerList HANDLER_LIST = new HandlerList();
@@ -93,7 +93,7 @@ index 0000000000000000000000000000000000000000..fb5bbfffea8b883e4c8769484a2b64dd
+ private final int tickNumber;
+
+ @ApiStatus.Internal
-+ public ServerTickStartEvent(int tickNumber) {
++ public ServerTickStartEvent(final int tickNumber) {
+ this.tickNumber = tickNumber;
+ }
+
@@ -104,12 +104,10 @@ index 0000000000000000000000000000000000000000..fb5bbfffea8b883e4c8769484a2b64dd
+ return this.tickNumber;
+ }
+
-+ @NotNull
+ public HandlerList getHandlers() {
+ return HANDLER_LIST;
+ }
+
-+ @NotNull
+ public static HandlerList getHandlerList() {
+ return HANDLER_LIST;
+ }