Package xyz.srnyx.annoyingapi.file
Class PlayableSound
java.lang.Object
xyz.srnyx.javautilities.parents.Stringable
xyz.srnyx.annoyingapi.file.PlayableSound
- All Implemented Interfaces:
Statable
Represents a
Also has playing methods using
Sound with a category, volume, pitch
Also has playing methods using
XSound-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPlayableSound(@NotNull com.cryptomorin.xseries.XSound sound) Creates a newPlayableSoundobject with a volume and pitch of 1PlayableSound(@NotNull com.cryptomorin.xseries.XSound sound, float volume, float pitch) Creates a newPlayableSoundobjectPlayableSound(@NotNull com.cryptomorin.xseries.XSound sound, com.cryptomorin.xseries.XSound.Category category) 1.11+Creates a newPlayableSoundobject with a volume and pitch of 1PlayableSound(@NotNull com.cryptomorin.xseries.XSound sound, com.cryptomorin.xseries.XSound.Category category, @Nullable Float volume, @Nullable Float pitch) 1.11+Creates a newPlayableSoundobjectPlayableSound(@NotNull org.bukkit.Sound sound) PlayableSound(@NotNull org.bukkit.Sound sound, float volume, float pitch) PlayableSound(@NotNull org.bukkit.Sound sound, @Nullable Enum<?> category) PlayableSound(@NotNull org.bukkit.Sound sound, @Nullable Enum<?> category, @Nullable Float volume, @Nullable Float pitch) -
Method Summary
Modifier and TypeMethodDescriptionvoidplay(@NotNull org.bukkit.Location location) Plays theSoundat the givenLocationvoidplay(@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 givenLocationOverridesStatable.toStatValue()if non-nullMethods inherited from class xyz.srnyx.javautilities.parents.Stringable
toString, toString, toString, toString, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface xyz.srnyx.annoyingapi.stats.Statable
toStatValue
-
Field Details
-
sound
@NotNull public @NotNull com.cryptomorin.xseries.XSound soundTheSoundto play as aXSound -
category
@NotNull public com.cryptomorin.xseries.XSound.Category categoryThe SoundCategory to play theXSoundin -
volume
public float volumeThe volume to play theXSoundat -
pitch
public float pitchThe pitch to play theXSoundat
-
-
Constructor Details
-
PlayableSound
public PlayableSound(@NotNull @NotNull com.cryptomorin.xseries.XSound sound, @Nullable com.cryptomorin.xseries.XSound.Category category, @Nullable @Nullable Float volume, @Nullable @Nullable Float pitch) 1.11+Creates a newPlayableSoundobject -
PlayableSound
public PlayableSound(@NotNull @NotNull com.cryptomorin.xseries.XSound sound, @Nullable com.cryptomorin.xseries.XSound.Category category) 1.11+Creates a newPlayableSoundobject with a volume and pitch of 1 -
PlayableSound
public PlayableSound(@NotNull @NotNull com.cryptomorin.xseries.XSound sound, float volume, float pitch) Creates a newPlayableSoundobject -
PlayableSound
public PlayableSound(@NotNull @NotNull com.cryptomorin.xseries.XSound sound) Creates a newPlayableSoundobject with a volume and pitch of 1- Parameters:
sound-sound
-
PlayableSound
-
PlayableSound
public PlayableSound(@NotNull @NotNull org.bukkit.Sound sound, @Nullable @Nullable Enum<?> category) -
PlayableSound
public PlayableSound(@NotNull @NotNull org.bukkit.Sound sound, float volume, float pitch) -
PlayableSound
public PlayableSound(@NotNull @NotNull org.bukkit.Sound sound)
-
-
Method Details
-
play
public void play(@NotNull @NotNull org.bukkit.Location location) Plays theSoundat the givenLocation- Parameters:
location- theLocationto play theSoundat
-
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
-
toStatMap
Description copied from interface:StatableOverridesStatable.toStatValue()if non-null
-