Class SoundAction
java.lang.Object
io.github.lucfr1746.llibrary.action.Action
io.github.lucfr1746.llibrary.action.list.SoundAction
Represents an action that plays a sound for a player.
-
Constructor Summary
ConstructorsConstructorDescriptionSoundAction
(org.bukkit.Sound sound, float volume, float pitch) Constructs a SoundAction with the specified sound, volume, and pitch. -
Method Summary
Modifier and TypeMethodDescriptionvoid
execute
(org.bukkit.entity.Player target) Executes the action, playing the sound at the target player's location.float
getPitch()
Gets the pitch of the sound.org.bukkit.Sound
getSound()
Gets the sound that will be played.float
Gets the volume of the sound.
-
Constructor Details
-
SoundAction
public SoundAction(org.bukkit.Sound sound, float volume, float pitch) Constructs a SoundAction with the specified sound, volume, and pitch.- Parameters:
sound
- The sound to be played.volume
- The volume of the sound.pitch
- The pitch of the sound.
-
-
Method Details
-
getSound
public org.bukkit.Sound getSound()Gets the sound that will be played.- 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 action, playing the sound at the target player's location.
-