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:
@ -38,7 +38,7 @@ class PlayerHotbarPacket extends DataPacket{
|
||||
/** @var int[] */
|
||||
public $slots = [];
|
||||
|
||||
public function decodePayload(){
|
||||
protected function decodePayload(){
|
||||
$this->selectedSlot = $this->getUnsignedVarInt();
|
||||
$this->windowId = $this->getByte();
|
||||
$count = $this->getUnsignedVarInt();
|
||||
@ -47,7 +47,7 @@ class PlayerHotbarPacket extends DataPacket{
|
||||
}
|
||||
}
|
||||
|
||||
public function encodePayload(){
|
||||
protected function encodePayload(){
|
||||
$this->putUnsignedVarInt($this->selectedSlot);
|
||||
$this->putByte($this->windowId);
|
||||
$this->putUnsignedVarInt(count($this->slots));
|
||||
|
Reference in New Issue
Block a user