Class PlayableSound
java.lang.Object
me.hsgamer.hscore.bukkit.config.object.PlayableSound
a class that plays sounds to the given players.
-
Constructor Summary
ConstructorsConstructorDescriptionPlayableSound(@NotNull org.bukkit.Sound sound) ctor.PlayableSound(@NotNull org.bukkit.Sound sound, @NotNull Double volume) ctor.PlayableSound(@NotNull org.bukkit.Sound sound, @NotNull Double volume, @NotNull Double pitch) ctor. -
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable PlayableSounddeserialize(@NotNull Map<String, Object> serialized) serializes the values of the sound.voidplays the sound for the given player.voidplay(@NotNull org.bukkit.entity.Player... players) plays the sound for the given player.voidplays the sound for the given players on the given location.voidplay(@NotNull org.bukkit.Location location, @NotNull org.bukkit.entity.Player... players) plays the sound for the given players on the given location.serializes the values of the sound.
-
Constructor Details
-
PlayableSound
public PlayableSound(@NotNull @NotNull org.bukkit.Sound sound, @NotNull @NotNull Double volume, @NotNull @NotNull Double pitch) ctor.- Parameters:
sound- the sound to play.volume- the volume to play.pitch- the pitch to play.
-
PlayableSound
ctor.- Parameters:
sound- the sound to play.volume- the volume to play.
-
PlayableSound
public PlayableSound(@NotNull @NotNull org.bukkit.Sound sound) ctor.- Parameters:
sound- the sound to play.
-
-
Method Details
-
deserialize
@Nullable public static @Nullable PlayableSound deserialize(@NotNull @NotNull Map<String, Object> serialized) serializes the values of the sound.- Returns:
- a serialized map.
-
play
public void play(@NotNull @NotNull org.bukkit.entity.Player... players) plays the sound for the given player.- Parameters:
players- the players to play.
-
play
plays the sound for the given player.- Parameters:
players- the players to play.
-
play
public void play(@NotNull @NotNull org.bukkit.Location location, @NotNull @NotNull org.bukkit.entity.Player... players) plays the sound for the given players on the given location.- Parameters:
players- the players to play.location- the location to play.
-
play
public void play(@NotNull @NotNull org.bukkit.Location location, @NotNull @NotNull Iterable<org.bukkit.entity.Player> players) plays the sound for the given players on the given location.- Parameters:
players- the players to play.location- the location to play.
-
serialize
serializes the values of the sound.- Returns:
- a serialized map.
-