How to implement spout sound manager in commands? and more...

Discussion in 'Plugin Development' started by acuddlyheadcrab, Sep 22, 2011.

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

    acuddlyheadcrab

    Im making a simple first plugin that plays a meow.ogg file using spout. I can get the command working, but right now I only have printmessages as placeholders for the command.

    Questions I has:

    - Does anyone know how to implement the spout sound manager into a command?
    - A noobish question; where do I put command codes? Inside onEnable method or in another class or what?
    - Also im having trouble checking if (player.hasSpoutCraftEnabled) . Ill try to write what I have for now

    // what var player is in mah code
    Player p

    // if statements with placeholders

    if (p.hasSpoutCraftEnabled(true)){
    System.out.println("meow")
    } else {
    System.out.println("you must have spoutcraft to meow!");



    Forgive me if this post is hard to read or anything. I am writing this from my phone.

    bump? Is that allowed here?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 19, 2016
  2. A)Instead of System.out.println use player.sendMessage(), it shows up in game :)
    B)Not sure what you mean
    C)Command codes?
     
  3. Offline

    acuddlyheadcrab

    a) Oh i know that, i just was writing println() here because I was lazy

    b) With what? Spout? Spout sound manager? I contacted a spoutdev about it so, i got that answered :)

    c) Yeah, where do most people define what their commands do? (other than plugin.yml)
     
  4. Offline

    ZNickq

    Just type
    SpoutManager.getSoundManager().
    And lots of options will appear! Choose the one which suits you best!
    if you want more info all of them,go here:
    http://jd.getspout.org/
    And search "soundmanager"
    click on that,it will have info on all the music stuff!
     
  5. Offline

    acuddlyheadcrab

    Thanks :D
     
Thread Status:
Not open for further replies.

Share This Page