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.Stringable
Represents a
Sound with a volume and pitch-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPlayableSound(@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 Object category) 1.11+Creates a newPlayableSoundobject with a volume and pitch of 1PlayableSound(@NotNull org.bukkit.Sound sound, @Nullable Object category, float volume, float pitch) 1.11+Creates a newPlayableSoundobject -
Method Summary
Modifier and TypeMethodDescriptionvoidplay(@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 givenWorldvoidplay(@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 givenLocationMethods inherited from class xyz.srnyx.javautilities.parents.Stringable
toString, toString, toString, toString, toString
-
Field Details
-
sound
@NotNull public @NotNull org.bukkit.Sound soundTheSoundto play -
category
The SoundCategory to play theSoundin -
volume
public float volumeThe volume to play theSoundat -
pitch
public float pitchThe pitch to play theSoundat
-
-
Constructor Details
-
PlayableSound
public PlayableSound(@NotNull @NotNull org.bukkit.Sound sound, @Nullable @Nullable Object category, float volume, float pitch) 1.11+Creates a newPlayableSoundobject -
PlayableSound
1.11+Creates a newPlayableSoundobject with a volume and pitch of 1 -
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 Details
-
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
-