mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-24 17:22:55 +01:00
SPIGOT-5509: Sleeping player does not eject bed when teleported
By: md_5 <git@md-5.net>
This commit is contained in:
parent
b2fd1fcbe1
commit
e0d3951ff9
1 changed files with 5 additions and 0 deletions
|
@ -643,6 +643,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
// If this player is riding another entity, we must dismount before teleporting.
|
// If this player is riding another entity, we must dismount before teleporting.
|
||||||
entity.stopRiding();
|
entity.stopRiding();
|
||||||
|
|
||||||
|
// SPIGOT-5509: Wakeup, similar to riding
|
||||||
|
if (this.isSleeping()) {
|
||||||
|
this.wakeup(false);
|
||||||
|
}
|
||||||
|
|
||||||
// Update the From Location
|
// Update the From Location
|
||||||
from = event.getFrom();
|
from = event.getFrom();
|
||||||
// Grab the new To Location dependent on whether the event was cancelled.
|
// Grab the new To Location dependent on whether the event was cancelled.
|
||||||
|
|
Loading…
Add table
Reference in a new issue