Skip to content

Getting started

koca2000 edited this page Jul 22, 2023 · 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>1.6.2</version>
    <scope>provided</scope>
</dependency>

Step 1 - Gradle

Add this to your build.gradle:

repositories {
    ...
    maven { url 'https://jitpack.io' }
}

dependencies {
    compileOnly 'com.github.koca2000:NoteBlockAPI:1.6.2'
}

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