broadcast player skin to all online players by default

otherwise we could end up with undesirable bugs like players having the wrong skin when travelling from another part of the world... the skin has to be sent to everyone to update the player list
This commit is contained in:
Dylan K. Taylor 2017-10-29 12:19:01 +00:00
parent 991d321928
commit 7e490ccdf2

View File

@ -768,12 +768,7 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
* If null is given, will additionally send the skin to the player itself as well as its viewers.
*/
public function sendSkin(array $targets = null) : void{
if($targets === null){
$targets = $this->hasSpawned;
$targets[] = $this;
}
parent::sendSkin($targets);
parent::sendSkin($targets ?? $this->server->getOnlinePlayers());
}
/**