3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-15 12:30:06 +01:00
Paper/patches/api/0272-add-isDeeplySleeping-to-HumanEntity.patch
2023-03-14 15:13:41 -07:00

27 Zeilen
1019 B
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jake Potrebic <jake.m.potrebic@gmail.com>
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 b21325401f59a02c0fb52d203e90b0f6207b556f..399ea8a6f4fbd9d6bf04853d2d6b21a5e352a7fd 100644
--- a/src/main/java/org/bukkit/entity/HumanEntity.java
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java
@@ -358,6 +358,15 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
void setHurtDirection(float hurtDirection);
// Paper end
+ // 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.
*