Finish converting all events to jspecify annotations

This commit is contained in:
Jake Potrebic
2024-09-29 16:48:34 -07:00
parent fa97c59a4e
commit 29a25df60e
78 changed files with 757 additions and 883 deletions

View File

@@ -17,20 +17,21 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+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..00000000000000000000000000000000
+ *
+ * @return location of the respawned player
+ */
+ @NotNull
+ public Location getRespawnedLocation() {
+ return this.respawnedLocation.clone();
+ }
@@ -56,12 +56,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ }
+
+ @Override
+ @NotNull
+ public HandlerList getHandlers() {
+ return HANDLER_LIST;
+ }
+
+ @NotNull
+ public static HandlerList getHandlerList() {
+ return HANDLER_LIST;
+ }