Found some things in new packets

This commit is contained in:
Dylan K. Taylor
2018-03-31 17:27:52 +01:00
parent 91486a23a5
commit db432bb024
5 changed files with 103 additions and 8 deletions

View File

@ -30,12 +30,31 @@ use pocketmine\network\mcpe\NetworkSession;
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(){
//TODO
$this->displaySlot = $this->getString();
$this->objectiveName = $this->getString();
$this->displayName = $this->getString();
$this->criteriaName = $this->getString();
$this->sortOrder = $this->getVarInt();
}
protected function encodePayload(){
//TODO
$this->putString($this->displaySlot);
$this->putString($this->objectiveName);
$this->putString($this->displayName);
$this->putString($this->criteriaName);
$this->putVarInt($this->sortOrder);
}
public function handle(NetworkSession $session) : bool{