playNote Method?

Discussion in 'Plugin Development' started by KaiBB, May 14, 2012.

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

    KaiBB

    So, I'm trying to get a player (who happens to be op!) and play a note on his client, without Spout. It didn't work, so I put in a snippet to tell the player "Working!" when the playNote method is executed. It sent me a message, but no note was played.
    Code:
    Player op = Bukkit.getServer().getPlayerExact(msg);
    Location loc = op.getLocation();
    op.playNote(loc, Instrument.PIANO, Note.natural(1, Tone.C));
    
     
  2. Offline

    Njol

    I think there has to be an actual noteblock at 'loc' to be able to hear the note.
     
  3. Offline

    KaiBB

    Yeah, I just saw it in the JavaDocs. Thanks anyway!
    Njol
     
  4. Offline

    FalseVacuum

    You could send a block change, no? Virtually set a nearby but covered block to a noteblock and play the note?
     
  5. Offline

    KaiBB

    Already done, lol
     
  6. Offline

    FalseVacuum

    So it works? Something I've actually been considering doing, but I haven't seen a use for it yet.
     
  7. Offline

    KaiBB

    Haven't legitimately tested it... Working out errors with the plugin to call player names xD
     
Thread Status:
Not open for further replies.

Share This Page