From 75ac4e00b27d05627a3c4ffde7879a37dd612d02 Mon Sep 17 00:00:00 2001 From: Erik Broes Date: Fri, 23 Sep 2011 21:05:23 +0200 Subject: [PATCH] Cancel bed return method if entity is ignoring sleep. Thanks to EdGruberman. --- src/main/java/net/minecraft/server/EntityHuman.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java index eafc83b21f..ab564492a8 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -874,6 +874,8 @@ public abstract class EntityHuman extends EntityLiving { } public void a(boolean flag, boolean flag1, boolean flag2) { + if (this.fauxSleeping) return; // CraftBukkit - Can't leave bed if not in one! + this.b(0.6F, 1.8F); this.m_(); ChunkCoordinates chunkcoordinates = this.E;