Class BroadcastSoundAction

java.lang.Object
io.github.lucfr1746.llibrary.action.Action
io.github.lucfr1746.llibrary.action.list.BroadcastSoundAction

public class BroadcastSoundAction extends Action
Represents an action that broadcasts a sound to all online players.
  • Constructor Summary

    Constructors
    Constructor
    Description
    BroadcastSoundAction(org.bukkit.Sound sound, float volume, float pitch)
    Constructs a BroadcastSoundAction with the specified sound, volume, and pitch.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    execute(org.bukkit.entity.Player target)
    Executes the broadcast sound action, playing the sound for all online players.
    float
    Gets the pitch level of the sound.
    org.bukkit.Sound
    Gets the broadcasted sound.
    float
    Gets the volume level of the sound.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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.
      Specified by:
      execute in class Action
      Parameters:
      target - The player triggering the action (not directly used in this implementation).