Playing sounds

Discussion in 'Plugin Development' started by gomeow, Oct 20, 2012.

Thread Status:
Not open for further replies.
  1. Offline


    How can I play a jukebox sound at a player's location and let everyone hear it?
    does this work:

    player.playSound(name, x, y, z)

    also, where is there a reference of the sound names?
  2. Offline


    All sounds that can be played in player.playSound() are located in .minecraft/resources/newsound
    CevinWa and kroltan like this.
  3. Offline


  4. Offline


    I have never thought of that... Did you get it to work?
  5. Offline


    it works perfectly

    i use this in my plugin.
    now i choosed to play the sound blaze death.
    The bukkit is just so you could place it in voids to.

    Location location = event.getLcation();
    String playername = event.getPlayer.getName();
    Bukkit.getPlayer(playerName).getWorld().playSound(location,Sound.BLAZE_DEATH,1, 0);
  6. for what do the 2 last args stand?
  7. Offline


    volume and pitch
  8. thx

    what is the default volume and pitch? 0?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 29, 2016
  9. Offline


    I don't know but here are some guesses :)
    * volumn 1F is "normal" (meaning 100 %) and pitch 1F too (maybe)
    * values below 0F and above 2F shouldn't make any difference ( in some cases something around 0.5 is already the min.)
    * this (especially the pitch value) can differ depending on the sound..
    Skyost likes this.
Thread Status:
Not open for further replies.

Share This Page