aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0580-add-isDeeplySleeping-to-HumanEntity.patch
blob: 28dad086f79769586e4a3f8b1ff19f7b82c4672b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jake Potrebic <jake.m.potrebic@gmail.com>
Date: Thu, 8 Apr 2021 17:36:10 -0700
Subject: [PATCH] add isDeeplySleeping to HumanEntity


diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
index a8aa176b8afd45fada9529d4d0b92000299faf1b..329e0586ec4ea44b6a8f4b72a69041aa7cd01ced 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
@@ -133,6 +133,13 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
     }
     // Paper end
 
+    // Paper start
+    @Override
+    public boolean isDeeplySleeping() {
+        return getHandle().isSleepingLongEnough();
+    }
+    // Paper end
+
     @Override
     public int getSleepTicks() {
         return this.getHandle().sleepCounter;