Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added more info to readme #3

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 46 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>

<dependencies>
<dependency>
<groupId>com.github.koca2000</groupId>
<artifactId>NoteBlockAPI</artifactId>
<version>-SNAPSHOT</version>
</dependency>
</dependencies>
```
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);
```