Updated FloatingTextParticle to use less heavy method

This commit is contained in:
Shoghi Cervantes
2015-05-19 21:59:23 +02:00
parent 7753b1d8be
commit 32722856ea
2 changed files with 14 additions and 14 deletions

View File

@ -180,11 +180,12 @@ class Human extends Creature implements ProjectileSource, InventoryHolder{
}
}
$this->namedtag->Skin = new Compound("Skin", [
"Data" => new String("Data", $this->getSkinData()),
"Slim" => new Byte("Slim", $this->isSkinSlim() ? 1 : 0)
]);
if(strlen($this->getSkinData()) > 0){
$this->namedtag->Skin = new Compound("Skin", [
"Data" => new String("Data", $this->getSkinData()),
"Slim" => new Byte("Slim", $this->isSkinSlim() ? 1 : 0)
]);
}
}
public function spawnTo(Player $player){