Class SoundInfo

java.lang.Object
net.glowstone.util.SoundInfo

public class SoundInfo extends Object
A class that encapsulates relevant data for playing sounds (volume and pitch).
  • Field Details

    • DEFAULT_BREAK_SOUND

      public static final SoundInfo DEFAULT_BREAK_SOUND
    • DEFAULT_STEP_SOUND

      public static final SoundInfo DEFAULT_STEP_SOUND
    • DEFAULT_PLACE_SOUND

      public static final SoundInfo DEFAULT_PLACE_SOUND
    • DEFAULT_HIT_SOUND

      public static final SoundInfo DEFAULT_HIT_SOUND
    • DEFAULT_FALL_SOUND

      public static final SoundInfo 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 sound
      location - 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

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object