mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-04 00:55:14 +00:00
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:
@ -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());
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user