broadcastSound
Broadcasts a sound to all players satisfying the given predicate.
This method sends a sound effect to all players that meet the condition specified by the provided predicate. The sound is played at a specified volume and pitch.
Parameters
The sound to be broadcasted to players.
The volume at which the sound is played. Typically ranges from 0.0 to 1.0.
The pitch of the sound. Higher values produce higher-pitched sounds.
A function that evaluates whether a player should receive the sound. Defaults to a predicate that includes all players.
Broadcasts a sound to all players satisfying the given predicate.
This method allows a sound to be played for a group of players based on a specified condition. By default, the sound is broadcasted to all players.
Parameters
The sound to be played.
A filter function to determine which players should receive the sound. Defaults to a predicate that always returns true.