Class BroadcastWorldSoundAction
java.lang.Object
io.github.lucfr1746.llibrary.action.Action
io.github.lucfr1746.llibrary.action.list.BroadcastWorldSoundAction
Represents an action that broadcasts a sound to all players in the same world as the target player.
-
Constructor Summary
ConstructorsConstructorDescriptionBroadcastWorldSoundAction
(org.bukkit.Sound sound, float volume, float pitch) Constructs a BroadcastWorldSoundAction with the specified sound, volume, and pitch. -
Method Summary
Modifier and TypeMethodDescriptionvoid
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
getPitch()
Gets the pitch of the sound.org.bukkit.Sound
getSound()
Gets the sound being broadcasted.float
Gets the volume of the sound.
-
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.
-