UpdateBlockPacket fixed and changed skinName to skinId

This commit is contained in:
Intyre
2016-06-22 01:07:09 +02:00
parent df8e1e8702
commit 6fb41c5c7f
6 changed files with 57 additions and 36 deletions

View File

@ -567,14 +567,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->getSkinName(), $this->getSkinData());
$this->server->updatePlayerListData($this->getUniqueId(), $this->getId(), $this->getDisplayName(), $this->getSkinId(), $this->getSkinData());
}
}
public function setSkin($str, $skinName){
parent::setSkin($str, $skinName);
public function setSkin($str, $skinId){
parent::setSkin($str, $skinId);
if($this->spawned){
$this->server->updatePlayerListData($this->getUniqueId(), $this->getId(), $this->getDisplayName(), $skinName, $str);
$this->server->updatePlayerListData($this->getUniqueId(), $this->getId(), $this->getDisplayName(), $skinId, $str);
}
}
@ -1850,7 +1850,7 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
break;
}
$this->setSkin($packet->skin, $packet->skinID);
$this->setSkin($packet->skin, $packet->skinId);
$this->server->getPluginManager()->callEvent($ev = new PlayerPreLoginEvent($this, "Plugin reason"));
if($ev->isCancelled()){