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:
@ -55,7 +55,7 @@ class BookEditPacket extends DataPacket{
|
||||
/** @var string */
|
||||
public $author;
|
||||
|
||||
public function decodePayload(){
|
||||
protected function decodePayload(){
|
||||
$this->type = $this->getByte();
|
||||
$this->inventorySlot = $this->getByte();
|
||||
|
||||
@ -82,7 +82,7 @@ class BookEditPacket extends DataPacket{
|
||||
}
|
||||
}
|
||||
|
||||
public function encodePayload(){
|
||||
protected function encodePayload(){
|
||||
$this->putByte($this->type);
|
||||
$this->putByte($this->inventorySlot);
|
||||
|
||||
|
Reference in New Issue
Block a user