mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
Updated for .13.1. skinName replaces isSlim, API bump
This commit is contained in:
@ -571,14 +571,14 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
|
||||
public function setDisplayName($name){
|
||||
$this->displayName = $name;
|
||||
if($this->spawned){
|
||||
$this->server->updatePlayerListData($this->getUniqueId(), $this->getId(), $this->getDisplayName(), $this->isSkinSlim(), $this->getSkinData());
|
||||
$this->server->updatePlayerListData($this->getUniqueId(), $this->getId(), $this->getDisplayName(), $this->getSkinName(), $this->getSkinData());
|
||||
}
|
||||
}
|
||||
|
||||
public function setSkin($str, $isSlim = false){
|
||||
parent::setSkin($str, $isSlim);
|
||||
public function setSkin($str, $skinName){
|
||||
parent::setSkin($str, $skinName);
|
||||
if($this->spawned){
|
||||
$this->server->updatePlayerListData($this->getUniqueId(), $this->getId(), $this->getDisplayName(), $isSlim, $str);
|
||||
$this->server->updatePlayerListData($this->getUniqueId(), $this->getId(), $this->getDisplayName(), $skinName, $str);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1856,7 +1856,7 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
|
||||
break;
|
||||
}
|
||||
|
||||
$this->setSkin($packet->skin, $packet->slim);
|
||||
$this->setSkin($packet->skin, $packet->skinName);
|
||||
|
||||
$this->server->getPluginManager()->callEvent($ev = new PlayerPreLoginEvent($this, "Plugin reason"));
|
||||
if($ev->isCancelled()){
|
||||
|
Reference in New Issue
Block a user