aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/api/0281-add-isDeeplySleeping-to-HumanEntity.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/api/0281-add-isDeeplySleeping-to-HumanEntity.patch')
-rw-r--r--patches/api/0281-add-isDeeplySleeping-to-HumanEntity.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/patches/api/0281-add-isDeeplySleeping-to-HumanEntity.patch b/patches/api/0281-add-isDeeplySleeping-to-HumanEntity.patch
new file mode 100644
index 0000000000..cf7ca8b27c
--- /dev/null
+++ b/patches/api/0281-add-isDeeplySleeping-to-HumanEntity.patch
@@ -0,0 +1,26 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Jake Potrebic <[email protected]>
+Date: Thu, 8 Apr 2021 17:36:15 -0700
+Subject: [PATCH] add isDeeplySleeping to HumanEntity
+
+
+diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
+index ebbe3417369201df231060dd39f1fb200eb7ad48..e8b6cfe7e454c666b4d60b702a3b211dab238830 100644
+--- a/src/main/java/org/bukkit/entity/HumanEntity.java
++++ b/src/main/java/org/bukkit/entity/HumanEntity.java
+@@ -327,6 +327,15 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
+ */
+ public void setCooldown(@NotNull Material material, int ticks);
+
++ // Paper start
++ /**
++ * If the player has slept enough to count towards passing the night.
++ *
++ * @return true if the player has slept enough
++ */
++ public boolean isDeeplySleeping();
++ // Paper end
++
+ /**
+ * Get the sleep ticks of the player. This value may be capped.
+ *