Updated for .13.1. skinName replaces isSlim, API bump

This commit is contained in:
Intyre
2015-12-16 14:37:46 +01:00
parent 2ddc4455c5
commit 90c3e66e6b
6 changed files with 24 additions and 26 deletions

View File

@ -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()){