Begin switching to JSpecify annotations (#11448)
* Begin switching to JSpecify annotations * more * fixes
This commit is contained in:
@@ -16,11 +16,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+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..00000000000000000000000000000000
|
||||
+ 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,12 +64,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ return this.timeEnd - System.nanoTime();
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ public HandlerList getHandlers() {
|
||||
+ return HANDLER_LIST;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ public static HandlerList getHandlerList() {
|
||||
+ return HANDLER_LIST;
|
||||
+ }
|
||||
@@ -84,8 +83,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+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..00000000000000000000000000000000
|
||||
+ private final int tickNumber;
|
||||
+
|
||||
+ @ApiStatus.Internal
|
||||
+ public ServerTickStartEvent(int tickNumber) {
|
||||
+ public ServerTickStartEvent(final int tickNumber) {
|
||||
+ this.tickNumber = tickNumber;
|
||||
+ }
|
||||
+
|
||||
@@ -104,12 +104,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ return this.tickNumber;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ public HandlerList getHandlers() {
|
||||
+ return HANDLER_LIST;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ public static HandlerList getHandlerList() {
|
||||
+ return HANDLER_LIST;
|
||||
+ }
|
||||
|
||||
Reference in New Issue
Block a user