Package xyz.srnyx.annoyingapi.file
Class PlayableSound
- java.lang.Object
-
- xyz.srnyx.javautilities.parents.Stringable
-
- xyz.srnyx.annoyingapi.file.PlayableSound
-
public class PlayableSound extends xyz.srnyx.javautilities.parents.StringableRepresents aSoundwith a volume and pitch
-
-
Constructor Summary
Constructors Constructor Description PlayableSound(@NotNull org.bukkit.Sound sound)Creates a newPlayableSoundobject with a volume and pitch of 1PlayableSound(@NotNull org.bukkit.Sound sound, float volume, float pitch)Creates a newPlayableSoundobjectPlayableSound(@NotNull org.bukkit.Sound sound, @Nullable java.lang.Object category)1.11+Creates a newPlayableSoundobject with a volume and pitch of 1PlayableSound(@NotNull org.bukkit.Sound sound, @Nullable java.lang.Object category, float volume, float pitch)1.11+Creates a newPlayableSoundobject
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidplay(@NotNull org.bukkit.entity.Player player)Plays theSoundto the givenPlayerat the player's locationvoidplay(@NotNull org.bukkit.entity.Player player, @Nullable org.bukkit.Location location)Plays theSoundto the givenPlayerat the givenLocationvoidplay(@Nullable org.bukkit.World world)Plays theSoundin the givenWorldat the world's spawnvoidplay(@Nullable org.bukkit.World world, @Nullable org.bukkit.Location location)Plays theSoundat the givenLocationin the givenWorld
-
-
-
Field Detail
-
sound
@NotNull public final @NotNull org.bukkit.Sound sound
TheSoundto play
-
category
@Nullable public final @Nullable java.lang.Object category
The SoundCategory to play theSoundin
-
volume
public final float volume
The volume to play theSoundat
-
pitch
public final float pitch
The pitch to play theSoundat
-
-
Constructor Detail
-
PlayableSound
public PlayableSound(@NotNull @NotNull org.bukkit.Sound sound, @Nullable @Nullable java.lang.Object category, float volume, float pitch)1.11+Creates a newPlayableSoundobject- Parameters:
sound-soundcategory-categoryvolume-volumepitch-pitch- See Also:
1.10.2 and below
-
PlayableSound
public PlayableSound(@NotNull @NotNull org.bukkit.Sound sound, @Nullable @Nullable java.lang.Object category)1.11+Creates a newPlayableSoundobject with a volume and pitch of 1- Parameters:
sound-soundcategory-category- See Also:
1.10.2 and below
-
PlayableSound
public PlayableSound(@NotNull @NotNull org.bukkit.Sound sound, float volume, float pitch)Creates a newPlayableSoundobject
-
PlayableSound
public PlayableSound(@NotNull @NotNull org.bukkit.Sound sound)Creates a newPlayableSoundobject with a volume and pitch of 1- Parameters:
sound-sound
-
-
Method Detail
-
play
public void play(@Nullable @Nullable org.bukkit.World world, @Nullable @Nullable org.bukkit.Location location)Plays theSoundat the givenLocationin the givenWorld- Parameters:
world- theWorldto play theSoundin, or null to play in the default worldlocation- theLocationto play theSoundat, or null to play at the world's spawn
-
play
public void play(@Nullable @Nullable org.bukkit.World world)Plays theSoundin the givenWorldat the world's spawn- Parameters:
world- theWorldto play theSoundin
-
play
public void play(@NotNull @NotNull org.bukkit.entity.Player player, @Nullable @Nullable org.bukkit.Location location)Plays theSoundto the givenPlayerat the givenLocation- Parameters:
player- thePlayerto play theSoundtolocation- theLocationto play theSoundat, or null to play at the player's location
-
play
public void play(@NotNull @NotNull org.bukkit.entity.Player player)Plays theSoundto the givenPlayerat the player's location- Parameters:
player- thePlayerto play theSoundto
-
-