mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-05 17:36:12 +00:00
Cleaned up some bad code in DataPacket, added encode/decodeHeader and made encode/decodePayload protected
This commit is contained in:
@ -71,7 +71,7 @@ class AdventureSettingsPacket extends DataPacket{
|
||||
public $playerPermission = PlayerPermissions::MEMBER;
|
||||
public $long1 = 0;
|
||||
|
||||
public function decodePayload(){
|
||||
protected function decodePayload(){
|
||||
$this->flags = $this->getUnsignedVarInt();
|
||||
$this->commandPermission = $this->getUnsignedVarInt();
|
||||
$this->flags2 = $this->getUnsignedVarInt();
|
||||
@ -79,7 +79,7 @@ class AdventureSettingsPacket extends DataPacket{
|
||||
$this->long1 = $this->getLLong();
|
||||
}
|
||||
|
||||
public function encodePayload(){
|
||||
protected function encodePayload(){
|
||||
$this->putUnsignedVarInt($this->flags);
|
||||
$this->putUnsignedVarInt($this->commandPermission);
|
||||
$this->putUnsignedVarInt($this->flags2);
|
||||
|
Reference in New Issue
Block a user