mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-20 16:00:20 +00:00
fix(Entity): broadcastSound()
not firing WorldSoundEvent
(#6069)
This commit is contained in:
parent
ed4088755f
commit
94a17f59d2
@ -1686,7 +1686,7 @@ abstract class Entity{
|
||||
*/
|
||||
public function broadcastSound(Sound $sound, ?array $targets = null) : void{
|
||||
if(!$this->silent){
|
||||
NetworkBroadcastUtils::broadcastPackets($targets ?? $this->getViewers(), $sound->encode($this->location));
|
||||
$this->getWorld()->addSound($this->location->asVector3(), $sound, $targets ?? $this->getViewers());
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user