Disabling Sounds?

Discussion in 'Plugin Development' started by Gabum, Jun 18, 2014.

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

    Gabum

    Hello Bukkiteers!

    I'm currently working on a dungeon plugin, and I'm having a problem:
    The dungeons are very close-built and so the mobs are standing everywhere, and they are making a heavy noise! So I would like to remove the sounds the mobs are making when they are inactive.

    Any ideas how to do that? I don't want to disable ALL sounds, just those sounds. Please help me!
     
  2. Offline

    Garris0n

    ProtocolLib?
     
  3. Offline

    Gabum

    Garris0n
    What is that? sorry, I'm not that experienced with bukkit :D
     
  4. Offline

    Garris0n

    Are you experienced with Google?
     
    Rocoty likes this.
  5. Offline

    Gabum

    I'm not dumb, I already googled it. It is an API? How do I use it?
     
  6. Offline

    Garris0n

    Well, you googled it. That's a start. Now try reading the results...?
     
  7. Offline

    Gabum

    Well, nevermind. I already found out how to use it. But there does not seem to be an option for getting the "reason" of the sound, but just which sound is played. That would cause that I can't play the sounds the event causes in any other context.
     
  8. Offline

    fireblast709

    Gabum the name of the sound should give you a general cause, i.e. hurt sounds for damage
     
    Garris0n likes this.
  9. Offline

    Gabum

    ok, I will try it.

    Ok, I now tried to use the stuff that is on the support website of ProtocolLib(http://dev.bukkit.org/bukkit-plugins/protocollib/pages/tutorial/), but how am I supposed to check whether the sound was caused by something like InactiveMob or something similar? The only possibility is using NAMED_SOUND_EFFECT, which is also fired if the player e.g hits the mob. So that would be disabled, too.

    Please help me!

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 8, 2016
  10. Offline

    Garris0n

    It's fired if there are sounds played. Find however you get the name of the sound. Isn't there a Packet#getStrings() or something? Figure out which one is the sound effect name, and then compare it with a list of sounds you want to get rid of.
     
  11. Offline

    Gabum

    Last edited by a moderator: Jun 8, 2016
  12. Offline

    Garris0n

Thread Status:
Not open for further replies.

Share This Page