mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-16 18:59:00 +00:00
Fixed skins issue
This commit is contained in:
parent
e5f28e0f7a
commit
383fcba8e1
@ -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();
|
||||
}
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user