mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-06 23:22:10 -07:00
Finish converting all events to jspecify annotations
This commit is contained in:
@@ -17,7 +17,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+import org.bukkit.event.HandlerList;
|
||||
+import org.bukkit.event.world.ChunkEvent;
|
||||
+import org.jetbrains.annotations.ApiStatus;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+import org.jspecify.annotations.NullMarked;
|
||||
+
|
||||
+/**
|
||||
+ * Is called when a {@link Player} receives a {@link Chunk}
|
||||
@@ -27,6 +27,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ * Should only be used for packet/clientside related stuff.
|
||||
+ * Not intended for modifying server side state.
|
||||
+ */
|
||||
+@NullMarked
|
||||
+public class PlayerChunkLoadEvent extends ChunkEvent {
|
||||
+
|
||||
+ private static final HandlerList HANDLER_LIST = new HandlerList();
|
||||
@@ -34,23 +35,20 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ private final Player player;
|
||||
+
|
||||
+ @ApiStatus.Internal
|
||||
+ public PlayerChunkLoadEvent(@NotNull Chunk chunk, @NotNull Player player) {
|
||||
+ public PlayerChunkLoadEvent(final Chunk chunk, final Player player) {
|
||||
+ super(chunk);
|
||||
+ this.player = player;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ public Player getPlayer() {
|
||||
+ return this.player;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ @Override
|
||||
+ public HandlerList getHandlers() {
|
||||
+ return HANDLER_LIST;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ public static HandlerList getHandlerList() {
|
||||
+ return HANDLER_LIST;
|
||||
+ }
|
||||
@@ -68,7 +66,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+import org.bukkit.event.HandlerList;
|
||||
+import org.bukkit.event.world.ChunkEvent;
|
||||
+import org.jetbrains.annotations.ApiStatus;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+import org.jspecify.annotations.NullMarked;
|
||||
+
|
||||
+/**
|
||||
+ * Is called when a {@link Player} receives a chunk unload packet.
|
||||
@@ -76,6 +74,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ * Should only be used for packet/clientside related stuff.
|
||||
+ * Not intended for modifying server side.
|
||||
+ */
|
||||
+@NullMarked
|
||||
+public class PlayerChunkUnloadEvent extends ChunkEvent {
|
||||
+
|
||||
+ private static final HandlerList HANDLER_LIST = new HandlerList();
|
||||
@@ -83,23 +82,20 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ private final Player player;
|
||||
+
|
||||
+ @ApiStatus.Internal
|
||||
+ public PlayerChunkUnloadEvent(@NotNull Chunk chunk, @NotNull Player player) {
|
||||
+ public PlayerChunkUnloadEvent(final Chunk chunk, final Player player) {
|
||||
+ super(chunk);
|
||||
+ this.player = player;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ public Player getPlayer() {
|
||||
+ return this.player;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ @Override
|
||||
+ public HandlerList getHandlers() {
|
||||
+ return HANDLER_LIST;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ public static HandlerList getHandlerList() {
|
||||
+ return HANDLER_LIST;
|
||||
+ }
|
||||
|
Reference in New Issue
Block a user