aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/api/0259-Added-PlayerDeepSleepEvent.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/api/0259-Added-PlayerDeepSleepEvent.patch')
-rw-r--r--patches/api/0259-Added-PlayerDeepSleepEvent.patch13
1 files changed, 6 insertions, 7 deletions
diff --git a/patches/api/0259-Added-PlayerDeepSleepEvent.patch b/patches/api/0259-Added-PlayerDeepSleepEvent.patch
index b333894788..73c3ea9004 100644
--- a/patches/api/0259-Added-PlayerDeepSleepEvent.patch
+++ b/patches/api/0259-Added-PlayerDeepSleepEvent.patch
@@ -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;
+ }