Skip to content

WorldSoundEvent ​

class · pocketmine\event\world\WorldSoundEvent · source

Extends WorldEvent
Implements Cancellable

Called when a sound is played in a world

Methods ​

__construct() ​

php
public function __construct(\pocketmine\world\World $world, \pocketmine\world\sound\Sound $sound, \pocketmine\math\Vector3 $position, array $recipients)

getPosition() ​

php
public function getPosition() : \pocketmine\math\Vector3

getRecipients() ​

php
public function getRecipients() : array

getSound() ​

php
public function getSound() : \pocketmine\world\sound\Sound

setRecipients() ​

php
public function setRecipients(array $recipients) : void

setSound() ​

php
public function setSound(\pocketmine\world\sound\Sound $sound) : void

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.