mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 16:51:42 +00:00
Corrected encode/decode of TextPacket parameters
This commit is contained in:
parent
cf222324d6
commit
e60364d7c9
@ -54,7 +54,7 @@ class TextPacket extends DataPacket{
|
||||
|
||||
case self::TYPE_TRANSLATION:
|
||||
$this->message = $this->getString();
|
||||
$count = $this->getByte();
|
||||
$count = $this->getUnsignedVarInt();
|
||||
for($i = 0; $i < $count; ++$i){
|
||||
$this->parameters[] = $this->getString();
|
||||
}
|
||||
@ -76,7 +76,7 @@ class TextPacket extends DataPacket{
|
||||
|
||||
case self::TYPE_TRANSLATION:
|
||||
$this->putString($this->message);
|
||||
$this->putByte(count($this->parameters));
|
||||
$this->putUnsignedVarInt(count($this->parameters));
|
||||
foreach($this->parameters as $p){
|
||||
$this->putString($p);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user