From f6228935c593d571498fd5abce2691a45ec62dab Mon Sep 17 00:00:00 2001 From: Vincent Stakenburg Date: Wed, 11 Oct 2017 15:25:22 +0200 Subject: [PATCH] Added more info to readme --- README.md | 47 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5eb6958..fdf20cf 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,49 @@ # NoteBlockAPI [![](https://jitpack.io/v/koca2000/NoteBlockAPI.svg)](https://jitpack.io/#koca2000/NoteBlockAPI) -For informations about this Spigot/Bukkit API go to https://www.spigotmc.org/resources/noteblockapi.19287/ +For information about this Spigot/Bukkit API go to https://www.spigotmc.org/resources/noteblockapi.19287/ + +### How to include in your plugin: +#### Step 1: +Maven: +```maven + + + jitpack.io + https://jitpack.io + + + + + + com.github.koca2000 + NoteBlockAPI + -SNAPSHOT + + +``` +Gradle: +```groovy +repositories { + maven { + url 'https://jitpack.io' + } + dependencies { + compile group: 'com.github.koca2000', name: 'NoteBlockAPI', version: '-SNAPSHOT' + } +} +``` +#### Step 2 +Add `depend: [NoteBlockAPI]` or `softdepend: [NoteBlockAPI]` to your `plugin.yml`. + +### Code example: +```java +Song s = NBSDecoder.parse(new File(getDataFolder(), "Song.nbs")); +// or +Song s = NBSDecoder.parse(new File("/plugins/myplugin/Song.nbs")); + +SongPlayer sp = new RadioSongPlayer(s); +sp.setAutoDestroy(true); +sp.addPlayer(player); +sp.setPlaying(true); +```