mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 08:44:01 +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:
parent
991d321928
commit
7e490ccdf2
@ -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());
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user