Skip to content
Developers
Getting Started

Getting Started

Installation

MythicDrops is published to Maven Central whenever it is released. This means you can easily install it as a dependency in your Maven or Gradle projects.

Maven

<dependencies>
    <!-- other dependencies... -->
    <dependency>
        <groupId>io.pixeloutlaw.mythicdrops</groupId>
        <artifactId>mythicdrops</artifactId>
        <version>x.y.z</version>
        <scope>provided</scope>
    </dependency>
</dependencies>

Gradle

Kotlin

repositories {
    mavenCentral()
}
 
dependencies {
    compileOnly("io.pixeloutlaw.mythicdrops:mythicdrops:x.y.z")
}

Groovy

repositories {
    mavenCentral()
}
 
dependencies {
    compileOnly "io.pixeloutlaw.mythicdrops:mythicdrops:x.y.z"
}

Quick Start

You can add MythicDrops as a softdepend or depend in your plugin.yml:

depend:
- MythicDrops

You should check if the plugin is enabled before accessing any of the APIs:

Bukkit.getPluginManager().isPluginEnabled("MythicDrops");

You can then start accessing anything exposed by the MythicDrops interface (opens in a new tab) like so:

// Let's get a tier by name
Tier legendaryTier = MythicDropsApi.getMythicDrops().getTierManager().getByName("legendary");
if (legendaryTier == null) {
    throw new RuntimeException("We don't have a tier named 'legendary'");
}
// Let's make an item from our tier
ItemStack legendaryItem = MythicDropsApi.getMythicDrops().getProductionLine().getTieredItemFactory().toItemStack(legendaryTier);
if (legendaryItem == null) {
    throw new RuntimeException("We weren't able to make an item from the 'legendary' tier");
}