From ee8818473d26e5c0be406b88f87567ae0376dc9c Mon Sep 17 00:00:00 2001 From: md_5 Date: Wed, 8 May 2019 20:34:41 +1000 Subject: [PATCH] SPIGOT-4888: setSleepingIgnored resets the night even when there is no one in a bed --- nms-patches/WorldServer.patch | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/nms-patches/WorldServer.patch b/nms-patches/WorldServer.patch index 4ad2df8abc..7a50933021 100644 --- a/nms-patches/WorldServer.patch +++ b/nms-patches/WorldServer.patch @@ -182,15 +182,15 @@ return entityliving != null && entityliving.isAlive() && this.f(entityliving.getChunkCoordinates()); }); -@@ -421,7 +485,7 @@ +@@ -419,7 +483,7 @@ + while (iterator.hasNext()) { + EntityPlayer entityplayer = (EntityPlayer) iterator.next(); - if (entityplayer.isSpectator()) { +- if (entityplayer.isSpectator()) { ++ if (entityplayer.isSpectator() || (entityplayer.fauxSleeping && !entityplayer.isSleeping())) { // CraftBukkit ++i; -- } else if (entityplayer.isSleeping()) { -+ } else if (entityplayer.isSleeping() || entityplayer.fauxSleeping) { // CraftBukkit + } else if (entityplayer.isSleeping()) { ++j; - } - } @@ -437,10 +501,22 @@ }