JavaDocs
JavaDocs for Mythic API can be found here:
Repositories
Maven
<repository>
<id>nexus</id>
<name>Lumine Releases</name>
<url>https://mvn.lumine.io/repository/maven-public/</url>
</repository>
Gradle (Groovy)
repositories {
// ...
mavenCentral()
maven { url 'https://mvn.lumine.io/repository/maven-public/' }
}
Gradle (Kotlin)
repositories {
// ...
mavenCentral()
maven(url = "https://mvn.lumine.io/repository/maven-public/")
}
Dependencies
Maven
<dependency>
<groupId>io.lumine</groupId>
<artifactId>Mythic-Dist</artifactId>
<version>5.6.1</version>
<scope>provided</scope>
</dependency>
Gradle (Groovy)
dependencies {
//...
compileOnly 'io.lumine:Mythic-Dist:5.6.1'
}
Gradle (Kotlin)
dependencies {
// ...
compileOnly("io.lumine:Mythic-Dist:5.6.1")
}
Examples
The MythicMobs API contains numerous events and helper classes to help you utilize our mobs, items, and skill systems.
Some examples to help you get started can be found here:
Spawning a MythicMob
MythicMob mob = MythicBukkit.inst().getMobManager().getMythicMob("SkeletalKnight").orElse(null);
Location spawnLocation = player.getLocation();
if(mob != null){
// spawns mob
ActiveMob knight = mob.spawn(BukkitAdapter.adapt(spawnLocation),1);
// get mob as bukkit entity
Entity entity = knight.getEntity().getBukkitEntity();
}
Check if a bukkit entity is a MythicMob
Entity bukkitEntity = ...;
boolean isMythicMob = MythicBukkit.inst().getMobManager().isMythicMob(bukkitEntity);
if(isMythicMob){
// ...
}
Get a collection of ActiveMobs using a predicate
Collection<ActiveMob> activeMobs = MythicBukkit.inst().getMobManager().getActiveMobs(am -> am.getMobType().equals("SkeletalKnight"));