mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-20 16:00:20 +00:00
Merge branch 'master' into mcpe-1.0
This commit is contained in:
commit
08ed2cd353
@ -595,13 +595,13 @@ class NBT{
|
||||
}
|
||||
|
||||
public function getString(bool $network = false){
|
||||
$len = $network ? $this->getByte() : $this->getShort();
|
||||
$len = $network ? Binary::readUnsignedVarInt($this) : $this->getShort();
|
||||
return $this->get($len);
|
||||
}
|
||||
|
||||
public function putString($v, bool $network = false){
|
||||
if($network === true){
|
||||
$this->putByte(strlen($v));
|
||||
$this->put(Binary::writeUnsignedVarInt(strlen($v)));
|
||||
}else{
|
||||
$this->putShort(strlen($v));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user