use pocketmine\network\PocketEditionNetworkSession; class ShowCreditsPacket extends DataPacket{ const NETWORK_ID = Info::SHOW_CREDITS_PACKET; const STATUS_START_CREDITS = 0; const STATUS_END_CREDITS = 1; public $playerEid; public $status; public function decode(){ $this->playerEid = $this->getEntityId(); $this->status = $this->getVarInt(); } public function encode(){ $this->reset(); $this->putEntityId($this->playerEid); $this->putVarInt($this->status); } public function handle(PocketEditionNetworkSession $session) : bool{ return $session->handleShowCredits($this); } }