Skip to content

Using events

koca2000 edited this page Apr 10, 2018 · 5 revisions

NoteBlockAPI provides several event you can handle.

SongEndEvent

Fired when SongPlayer goes to end of song.

@EventHandler
public void onSongEnd(SongEndEvent e){
    SongPlayer sp = e.getSongPlayer(); //Gives you SongPlayer
    Song s = sp.getSong();             //Gives you player Song
}
Clone this wiki locally