mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-17 03:08:58 +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){
|
public function setSkin($str, $isSlim = false){
|
||||||
parent::setSkin($str, $isSlim);
|
parent::setSkin($str, $isSlim);
|
||||||
if($this->spawned === true){
|
if($this->spawned){
|
||||||
$this->respawnToAll();
|
$this->respawnToAll();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -86,8 +86,14 @@ class Human extends Creature implements ProjectileSource, InventoryHolder{
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if(isset($this->namedtag->NameTag)){
|
if(!($this instanceof Player)){
|
||||||
$this->setNameTag($this->namedtag["NameTag"]);
|
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){
|
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();
|
parent::initEntity();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user