mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 02:08:21 +00:00
Cleaned up some bad code in DataPacket, added encode/decodeHeader and made encode/decodePayload protected
This commit is contained in:
@ -33,12 +33,12 @@ class TransferPacket extends DataPacket{
|
||||
public $address;
|
||||
public $port = 19132;
|
||||
|
||||
public function decodePayload(){
|
||||
protected function decodePayload(){
|
||||
$this->address = $this->getString();
|
||||
$this->port = $this->getLShort();
|
||||
}
|
||||
|
||||
public function encodePayload(){
|
||||
protected function encodePayload(){
|
||||
$this->putString($this->address);
|
||||
$this->putLShort($this->port);
|
||||
}
|
||||
|
Reference in New Issue
Block a user