mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 16:24:05 +00:00
Player: fix weird behaviour when teleporting sleeping players
closes #4672
This commit is contained in:
parent
688be0a404
commit
c82dfef9b0
@ -2373,6 +2373,7 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{
|
||||
if(parent::teleport($pos, $yaw, $pitch)){
|
||||
|
||||
$this->removeCurrentWindow();
|
||||
$this->stopSleep();
|
||||
|
||||
$this->sendPosition($this->location, $this->location->yaw, $this->location->pitch, MovePlayerPacket::MODE_TELEPORT);
|
||||
$this->broadcastMovement(true);
|
||||
@ -2384,7 +2385,6 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{
|
||||
if($this->spawnChunkLoadCount !== -1){
|
||||
$this->spawnChunkLoadCount = 0;
|
||||
}
|
||||
$this->stopSleep();
|
||||
$this->blockBreakHandler = null;
|
||||
|
||||
//TODO: workaround for player last pos not getting updated
|
||||
|
Loading…
x
Reference in New Issue
Block a user