use pocketmine\network\mcpe\handler\SessionHandler; class SetLocalPlayerAsInitializedPacket extends DataPacket implements ServerboundPacket{ public const NETWORK_ID = ProtocolInfo::SET_LOCAL_PLAYER_AS_INITIALIZED_PACKET; /** @var int */ public $entityRuntimeId; protected function decodePayload() : void{ $this->entityRuntimeId = $this->getEntityRuntimeId(); } protected function encodePayload() : void{ $this->putEntityRuntimeId($this->entityRuntimeId); } public function handle(SessionHandler $handler) : bool{ return $handler->handleSetLocalPlayerAsInitialized($this); } }