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:
@ -45,7 +45,7 @@ class SetTitlePacket extends DataPacket{
|
||||
public $stayTime = 0;
|
||||
public $fadeOutTime = 0;
|
||||
|
||||
public function decodePayload(){
|
||||
protected function decodePayload(){
|
||||
$this->type = $this->getVarInt();
|
||||
$this->text = $this->getString();
|
||||
$this->fadeInTime = $this->getVarInt();
|
||||
@ -53,7 +53,7 @@ class SetTitlePacket extends DataPacket{
|
||||
$this->fadeOutTime = $this->getVarInt();
|
||||
}
|
||||
|
||||
public function encodePayload(){
|
||||
protected function encodePayload(){
|
||||
$this->putVarInt($this->type);
|
||||
$this->putString($this->text);
|
||||
$this->putVarInt($this->fadeInTime);
|
||||
|
Reference in New Issue
Block a user