use pocketmine\network\mcpe\handler\SessionHandler; class SetDisplayObjectivePacket extends DataPacket{ public const NETWORK_ID = ProtocolInfo::SET_DISPLAY_OBJECTIVE_PACKET; /** @var string */ public $displaySlot; /** @var string */ public $objectiveName; /** @var string */ public $displayName; /** @var string */ public $criteriaName; /** @var int */ public $sortOrder; protected function decodePayload() : void{ $this->displaySlot = $this->getString(); $this->objectiveName = $this->getString(); $this->displayName = $this->getString(); $this->criteriaName = $this->getString(); $this->sortOrder = $this->getVarInt(); } protected function encodePayload() : void{ $this->putString($this->displaySlot); $this->putString($this->objectiveName); $this->putString($this->displayName); $this->putString($this->criteriaName); $this->putVarInt($this->sortOrder); } public function handle(SessionHandler $handler) : bool{ return $handler->handleSetDisplayObjective($this); } }