public class PlayableSound extends Stringable
Sound with a volume and pitch| Constructor and Description |
|---|
PlayableSound(@NotNull org.bukkit.Sound sound)
Creates a new
PlayableSound object with a volume and pitch of 1 |
PlayableSound(@NotNull org.bukkit.Sound sound,
float volume,
float pitch)
Creates a new
PlayableSound object |
PlayableSound(@NotNull org.bukkit.Sound sound,
@Nullable java.lang.Object category)
1.11+ Creates a new PlayableSound object with a volume and pitch of 1 |
PlayableSound(@NotNull org.bukkit.Sound sound,
@Nullable java.lang.Object category,
float volume,
float pitch)
1.11+ Creates a new PlayableSound object |
| Modifier and Type | Method and Description |
|---|---|
void |
play(@NotNull org.bukkit.entity.Player player)
Plays the
Sound to the given Player at the player's location |
void |
play(@NotNull org.bukkit.entity.Player player,
@Nullable org.bukkit.Location location)
Plays the
Sound to the given Player at the given Location |
void |
play(@Nullable org.bukkit.World world)
Plays the
Sound in the given World at the world's spawn |
void |
play(@Nullable org.bukkit.World world,
@Nullable org.bukkit.Location location)
Plays the
Sound at the given Location in the given World |
toString, toStringpublic PlayableSound(@NotNull
@NotNull org.bukkit.Sound sound,
@Nullable
@Nullable java.lang.Object category,
float volume,
float pitch)
1.11+ Creates a new PlayableSound objectsound - soundcategory - categoryvolume - volumepitch - pitch1.10.2 and belowpublic PlayableSound(@NotNull
@NotNull org.bukkit.Sound sound,
@Nullable
@Nullable java.lang.Object category)
1.11+ Creates a new PlayableSound object with a volume and pitch of 1sound - soundcategory - category1.10.2 and belowpublic PlayableSound(@NotNull
@NotNull org.bukkit.Sound sound,
float volume,
float pitch)
PlayableSound objectpublic PlayableSound(@NotNull
@NotNull org.bukkit.Sound sound)
PlayableSound object with a volume and pitch of 1sound - soundpublic void play(@Nullable
@Nullable org.bukkit.World world,
@Nullable
@Nullable org.bukkit.Location location)
Sound at the given Location in the given Worldworld - the World to play the Sound in, or null to play in the default worldlocation - the Location to play the Sound at, or null to play at the world's spawnpublic void play(@Nullable
@Nullable org.bukkit.World world)
Sound in the given World at the world's spawnworld - the World to play the Sound inpublic void play(@NotNull
@NotNull org.bukkit.entity.Player player,
@Nullable
@Nullable org.bukkit.Location location)
Sound to the given Player at the given Locationplayer - the Player to play the Sound tolocation - the Location to play the Sound at, or null to play at the player's locationpublic void play(@NotNull
@NotNull org.bukkit.entity.Player player)
Sound to the given Player at the player's locationplayer - the Player to play the Sound to