mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-09 03:06:55 +00:00
Cleaned up some bad code in DataPacket, added encode/decodeHeader and made encode/decodePayload protected
This commit is contained in:
@ -46,7 +46,7 @@ class TextPacket extends DataPacket{
|
||||
public $message;
|
||||
public $parameters = [];
|
||||
|
||||
public function decodePayload(){
|
||||
protected function decodePayload(){
|
||||
$this->type = $this->getByte();
|
||||
$this->unknownBool = $this->getBool();
|
||||
switch($this->type){
|
||||
@ -71,7 +71,7 @@ class TextPacket extends DataPacket{
|
||||
}
|
||||
}
|
||||
|
||||
public function encodePayload(){
|
||||
protected function encodePayload(){
|
||||
$this->putByte($this->type);
|
||||
$this->putBool($this->unknownBool);
|
||||
switch($this->type){
|
||||
|
Reference in New Issue
Block a user