Package net.glowstone.util
Class SoundInfo
java.lang.Object
net.glowstone.util.SoundInfo
A class that encapsulates relevant data for playing sounds (volume and pitch).
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
float
getPitch()
The pitch multiplier.org.bukkit.Sound
getSound()
The Bukkit sound enum constant.float
The volume.int
hashCode()
void
play
(org.bukkit.Location location) Plays the sound to all players at the given location.void
playTo
(org.bukkit.entity.Player player, org.bukkit.Location location) Plays the sound to the given player at the given location.toString()
-
Field Details
-
DEFAULT_BREAK_SOUND
-
DEFAULT_STEP_SOUND
-
DEFAULT_PLACE_SOUND
-
DEFAULT_HIT_SOUND
-
DEFAULT_FALL_SOUND
-
-
Constructor Details
-
SoundInfo
public SoundInfo(org.bukkit.Sound sound) Constructs a new GlowSound with the given sound and a volume and pitch of 1.- Parameters:
sound
- The Bukkit sound enum constant
-
SoundInfo
public SoundInfo(org.bukkit.Sound sound, float volume, float pitch)
-
-
Method Details
-
play
public void play(org.bukkit.Location location) Plays the sound to all players at the given location.- Parameters:
location
- Location at which to play the sound
-
playTo
public void playTo(org.bukkit.entity.Player player, org.bukkit.Location location) Plays the sound to the given player at the given location.- Parameters:
player
- Player to which to play the soundlocation
- Location at which to play the sound
-
getSound
public org.bukkit.Sound getSound()The Bukkit sound enum constant. -
getVolume
public float getVolume()The volume. -
getPitch
public float getPitch()The pitch multiplier. -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-