public function stopSleep()
{
if ($this->sleeping instanceof Vector3) {
$this->server->getPluginManager()->callEvent($ev = new PlayerBedLeaveEvent($this, $this->level->getBlock($this->sleeping)));
$this->sleeping = null;
$this->setDataProperty(self::DATA_PLAYER_BED_POSITION, self::DATA_TYPE_POS, [0, 0, 0]);
$this->setDataFlag(self::DATA_PLAYER_FLAGS, self::DATA_PLAYER_FLAG_SLEEP, false);
$this->level->sleepTicks = 0;
$pk = new AnimatePacket();
$pk->eid = 0;
$pk->action = PlayerAnimationEvent::WAKE_UP;
$this->dataPacket($pk);
}
}