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:
@ -47,7 +47,7 @@ class CraftingEventPacket extends DataPacket{
|
||||
return parent::clean();
|
||||
}
|
||||
|
||||
public function decodePayload(){
|
||||
protected function decodePayload(){
|
||||
$this->windowId = $this->getByte();
|
||||
$this->type = $this->getVarInt();
|
||||
$this->id = $this->getUUID();
|
||||
@ -63,7 +63,7 @@ class CraftingEventPacket extends DataPacket{
|
||||
}
|
||||
}
|
||||
|
||||
public function encodePayload(){
|
||||
protected function encodePayload(){
|
||||
$this->putByte($this->windowId);
|
||||
$this->putVarInt($this->type);
|
||||
$this->putUUID($this->id);
|
||||
|
Reference in New Issue
Block a user