Fixed skins issue

This commit is contained in:
Shoghi Cervantes 2015-06-07 12:17:27 +02:00
parent e5f28e0f7a
commit 383fcba8e1
No known key found for this signature in database
GPG Key ID: 78464DB0A7837F89
2 changed files with 9 additions and 7 deletions

View File

@ -567,7 +567,7 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
public function setSkin($str, $isSlim = false){
parent::setSkin($str, $isSlim);
if($this->spawned === true){
if($this->spawned){
$this->respawnToAll();
}
}

View File

@ -86,8 +86,14 @@ class Human extends Creature implements ProjectileSource, InventoryHolder{
}
if(isset($this->namedtag->NameTag)){
$this->setNameTag($this->namedtag["NameTag"]);
if(!($this instanceof Player)){
if(isset($this->namedtag->NameTag)){
$this->setNameTag($this->namedtag["NameTag"]);
}
if(isset($this->namedtag->Skin) and $this->namedtag->Skin instanceof Compound){
$this->setSkin($this->namedtag->Skin["Data"], $this->namedtag->Skin["Slim"] > 0);
}
}
if(isset($this->namedtag->Inventory) and $this->namedtag->Inventory instanceof Enum){
@ -102,10 +108,6 @@ class Human extends Creature implements ProjectileSource, InventoryHolder{
}
}
if(isset($this->namedtag->Skin) and $this->namedtag->Skin instanceof Compound){
$this->setSkin($this->namedtag->Skin["Data"], $this->namedtag->Skin["Slim"] > 0);
}
parent::initEntity();
}