https://github.com/pmmp/PocketMine-MP/blob/stable/src/pocketmine/entity/Entity.php#L303 PHP: use pocketmine\entity\Entity;$entity->setGenericFlag(Entity::DATA_FLAG_SLEEPING, true);