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
<!-- other dependencies... -->
< groupId > io.pixeloutlaw.mythicdrops </ groupId >
< artifactId > mythicdrops-api </ artifactId >
Gradle
compileOnly ( "io.pixeloutlaw.mythicdrops:mythicdrops-api:x.y.z" )
compileOnly " io.pixeloutlaw.mythicdrops:mythicdrops-api:x.y.z "
Quick Start
You can add MythicDrops as a softdepend
or depend
in your plugin.yml
:
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 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 " ) ;