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:
@ -39,14 +39,14 @@ class NpcRequestPacket extends DataPacket{
|
||||
/** @var int */
|
||||
public $actionType;
|
||||
|
||||
public function decodePayload(){
|
||||
protected function decodePayload(){
|
||||
$this->entityRuntimeId = $this->getEntityRuntimeId();
|
||||
$this->requestType = $this->getByte();
|
||||
$this->commandString = $this->getString();
|
||||
$this->actionType = $this->getByte();
|
||||
}
|
||||
|
||||
public function encodePayload(){
|
||||
protected function encodePayload(){
|
||||
$this->putEntityRuntimeId($this->entityRuntimeId);
|
||||
$this->putByte($this->requestType);
|
||||
$this->putString($this->commandString);
|
||||
|
Reference in New Issue
Block a user