Class BroadcastWorldSoundAction

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

public class BroadcastWorldSoundAction extends Action
Represents an action that broadcasts a sound to all players in the same world as the target player.
  • Constructor Summary

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

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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • BroadcastWorldSoundAction

      public BroadcastWorldSoundAction(org.bukkit.Sound sound, float volume, float pitch)
      Constructs a BroadcastWorldSoundAction with the specified sound, volume, and pitch.
      Parameters:
      sound - The sound to broadcast.
      volume - The volume of the sound.
      pitch - The pitch of the sound.
  • Method Details

    • getSound

      public org.bukkit.Sound getSound()
      Gets the sound being broadcasted.
      Returns:
      The sound.
    • getVolume

      public float getVolume()
      Gets the volume of the sound.
      Returns:
      The volume.
    • getPitch

      public float getPitch()
      Gets the pitch of the sound.
      Returns:
      The pitch.
    • execute

      public void execute(org.bukkit.entity.Player target)
      Executes the broadcast world sound action, playing the sound for all players in the same world as the target.
      Specified by:
      execute in class Action
      Parameters:
      target - The player triggering the action.