Finish converting all events to jspecify annotations
This commit is contained in:
parent
ea00be3aaa
commit
ba3c29b92e
82 changed files with 977 additions and 1103 deletions
|
@ -6,10 +6,10 @@ Subject: [PATCH] Added PlayerDeepSleepEvent
|
|||
|
||||
diff --git a/src/main/java/io/papermc/paper/event/player/PlayerDeepSleepEvent.java b/src/main/java/io/papermc/paper/event/player/PlayerDeepSleepEvent.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..54cf2ec5e025fac9a0c8f151ff4f8c83a62b8405
|
||||
index 0000000000000000000000000000000000000000..2d4b15ded1e9aa00f21ca0b412e6b6ac333e5e02
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/event/player/PlayerDeepSleepEvent.java
|
||||
@@ -0,0 +1,48 @@
|
||||
@@ -0,0 +1,47 @@
|
||||
+package io.papermc.paper.event.player;
|
||||
+
|
||||
+import org.bukkit.entity.Player;
|
||||
|
@ -17,7 +17,7 @@ index 0000000000000000000000000000000000000000..54cf2ec5e025fac9a0c8f151ff4f8c83
|
|||
+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;
|
||||
+
|
||||
+/**
|
||||
+ * Called when a player has slept long enough
|
||||
|
@ -26,6 +26,7 @@ index 0000000000000000000000000000000000000000..54cf2ec5e025fac9a0c8f151ff4f8c83
|
|||
+ * Cancelling this event will prevent the player from being counted as deeply sleeping
|
||||
+ * unless they exit and re-enter the bed.
|
||||
+ */
|
||||
+@NullMarked
|
||||
+public class PlayerDeepSleepEvent extends PlayerEvent implements Cancellable {
|
||||
+
|
||||
+ private static final HandlerList HANDLER_LIST = new HandlerList();
|
||||
|
@ -33,7 +34,7 @@ index 0000000000000000000000000000000000000000..54cf2ec5e025fac9a0c8f151ff4f8c83
|
|||
+ private boolean cancelled;
|
||||
+
|
||||
+ @ApiStatus.Internal
|
||||
+ public PlayerDeepSleepEvent(@NotNull Player player) {
|
||||
+ public PlayerDeepSleepEvent(final Player player) {
|
||||
+ super(player);
|
||||
+ }
|
||||
+
|
||||
|
@ -43,17 +44,15 @@ index 0000000000000000000000000000000000000000..54cf2ec5e025fac9a0c8f151ff4f8c83
|
|||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void setCancelled(boolean cancel) {
|
||||
+ public void setCancelled(final boolean cancel) {
|
||||
+ this.cancelled = cancel;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ @Override
|
||||
+ public HandlerList getHandlers() {
|
||||
+ return HANDLER_LIST;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ public static HandlerList getHandlerList() {
|
||||
+ return HANDLER_LIST;
|
||||
+ }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue