Skip to content

Getting started

koca2000 edited this page Jun 9, 2021 · 5 revisions

Install as dependency

Step 1 - Maven

Add this to your maven pom:

<repositories>
    <repository>
        <id>jitpack.io</id>
        <url>https://jitpack.io</url>
    </repository>
</repositories>

<dependency>
    <groupId>com.github.koca2000</groupId>
    <artifactId>NoteBlockAPI</artifactId>
    <version>-SNAPSHOT</version>
    <scope>provided</scope>
</dependency>

Step 1 - Gradle

Add this to your build.gradle:

repositories {
  maven {
    url 'https://jitpack.io'
  }
  dependencies {
    compile group: 'com.github.koca2000', name: 'NoteBlockAPI', version: '-SNAPSHOT'
  }
}

Step 2

Now add this line to your plugin.yml: depend: [NoteBlockAPI]

If is NoteBlockAPI only optional dependency use: softdepend: [NoteBlockAPI] and check if is present in onEnable function:

boolean NoteBlockAPI = true;
if (!Bukkit.getPluginManager().isPluginEnabled("NoteBlockAPI")){
    getLogger().severe("*** NoteBlockAPI is not installed or not enabled. ***");
    NoteBlockAPI = false;
    return;
}

Start playing songs

About types of SongPlayer and how to use them you can read here.

Clone this wiki locally