mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 10:22:56 +00:00
Accept null for targets in Human->sendSkin()
For humans, it'll send to all viewers. For players, it'll send to all viewers, and the player itself.
This commit is contained in:
@ -762,6 +762,20 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* 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);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the player IP address
|
||||
*
|
||||
|
Reference in New Issue
Block a user