mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
Cleaned up some bad code in DataPacket, added encode/decodeHeader and made encode/decodePayload protected
This commit is contained in:
@ -45,7 +45,7 @@ class EventPacket extends DataPacket{
|
||||
public $eventData;
|
||||
public $type;
|
||||
|
||||
public function decodePayload(){
|
||||
protected function decodePayload(){
|
||||
$this->playerRuntimeId = $this->getEntityRuntimeId();
|
||||
$this->eventData = $this->getVarInt();
|
||||
$this->type = $this->getByte();
|
||||
@ -53,7 +53,7 @@ class EventPacket extends DataPacket{
|
||||
//TODO: nice confusing mess
|
||||
}
|
||||
|
||||
public function encodePayload(){
|
||||
protected function encodePayload(){
|
||||
$this->putEntityRuntimeId($this->playerRuntimeId);
|
||||
$this->putVarInt($this->eventData);
|
||||
$this->putByte($this->type);
|
||||
|
Reference in New Issue
Block a user