From e0d3951ff9a0a4fed99091c6b3ca70c329fe9770 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Sat, 11 Jan 2020 14:14:23 +1100 Subject: [PATCH] SPIGOT-5509: Sleeping player does not eject bed when teleported By: md_5 --- .../main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java index ac7a4791b1..b3f87d6a24 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -643,6 +643,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player { // If this player is riding another entity, we must dismount before teleporting. entity.stopRiding(); + // SPIGOT-5509: Wakeup, similar to riding + if (this.isSleeping()) { + this.wakeup(false); + } + // Update the From Location from = event.getFrom(); // Grab the new To Location dependent on whether the event was cancelled.