Class BroadcastSoundAction
java.lang.Object
io.github.lucfr1746.llibrary.action.Action
io.github.lucfr1746.llibrary.action.list.BroadcastSoundAction
Represents an action that broadcasts a sound to all online players.
-
Constructor Summary
ConstructorsConstructorDescriptionBroadcastSoundAction(org.bukkit.Sound sound, float volume, float pitch) Constructs a BroadcastSoundAction with the specified sound, volume, and pitch. -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute(org.bukkit.entity.Player target) Executes the broadcast sound action, playing the sound for all online players.floatgetPitch()Gets the pitch level of the sound.org.bukkit.SoundgetSound()Gets the broadcasted sound.floatGets the volume level of the sound.
-
Constructor Details
-
BroadcastSoundAction
public BroadcastSoundAction(org.bukkit.Sound sound, float volume, float pitch) Constructs a BroadcastSoundAction with the specified sound, volume, and pitch.- Parameters:
sound- The sound to broadcast.volume- The volume level of the sound.pitch- The pitch level of the sound.
-
-
Method Details
-
getSound
public org.bukkit.Sound getSound()Gets the broadcasted sound.- Returns:
- The sound being played.
-
getVolume
public float getVolume()Gets the volume level of the sound.- Returns:
- The volume level.
-
getPitch
public float getPitch()Gets the pitch level of the sound.- Returns:
- The pitch level.
-
execute
public void execute(org.bukkit.entity.Player target) Executes the broadcast sound action, playing the sound for all online players.
-