Finish converting all events to jspecify annotations

This commit is contained in:
Jake Potrebic 2024-09-29 16:48:34 -07:00
parent ea00be3aaa
commit ba3c29b92e
No known key found for this signature in database
GPG key ID: ECE0B3C133C016C5
82 changed files with 977 additions and 1103 deletions

View file

@ -6,10 +6,10 @@ Subject: [PATCH] Add PlayerPostRespawnEvent
diff --git a/src/main/java/com/destroystokyo/paper/event/player/PlayerPostRespawnEvent.java b/src/main/java/com/destroystokyo/paper/event/player/PlayerPostRespawnEvent.java
new file mode 100644
index 0000000000000000000000000000000000000000..16961aac061e78fb84029f8435ab5f7c493b1362
index 0000000000000000000000000000000000000000..e82446ec3d706c47ac9a544f70d0c19b658665d5
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/player/PlayerPostRespawnEvent.java
@@ -0,0 +1,56 @@
@@ -0,0 +1,54 @@
+package com.destroystokyo.paper.event.player;
+
+import org.bukkit.Location;
@ -17,20 +17,21 @@ index 0000000000000000000000000000000000000000..16961aac061e78fb84029f8435ab5f7c
+import org.bukkit.event.HandlerList;
+import org.bukkit.event.player.PlayerEvent;
+import org.jetbrains.annotations.ApiStatus;
+import org.jetbrains.annotations.NotNull;
+import org.jspecify.annotations.NullMarked;
+
+/**
+ * Fired after a player has respawned
+ */
+@NullMarked
+public class PlayerPostRespawnEvent extends PlayerEvent {
+
+ private final static HandlerList HANDLER_LIST = new HandlerList();
+ private static final HandlerList HANDLER_LIST = new HandlerList();
+
+ private final Location respawnedLocation;
+ private final boolean isBedSpawn;
+
+ @ApiStatus.Internal
+ public PlayerPostRespawnEvent(@NotNull final Player respawnPlayer, @NotNull final Location respawnedLocation, final boolean isBedSpawn) {
+ public PlayerPostRespawnEvent(final Player respawnPlayer, final Location respawnedLocation, final boolean isBedSpawn) {
+ super(respawnPlayer);
+ this.respawnedLocation = respawnedLocation;
+ this.isBedSpawn = isBedSpawn;
@ -41,7 +42,6 @@ index 0000000000000000000000000000000000000000..16961aac061e78fb84029f8435ab5f7c
+ *
+ * @return location of the respawned player
+ */
+ @NotNull
+ public Location getRespawnedLocation() {
+ return this.respawnedLocation.clone();
+ }
@ -56,12 +56,10 @@ index 0000000000000000000000000000000000000000..16961aac061e78fb84029f8435ab5f7c
+ }
+
+ @Override
+ @NotNull
+ public HandlerList getHandlers() {
+ return HANDLER_LIST;
+ }
+
+ @NotNull
+ public static HandlerList getHandlerList() {
+ return HANDLER_LIST;
+ }