JavaDocs
JavaDocs for MythicMobs API can be found here:
Maven
Repository
<repository>
<id>nexus</id>
<name>Lumine Releases</name>
<url>https://mvn.lumine.io/repository/maven-public/</url>
</repository>
Dependency
<dependency>
<groupId>io.lumine</groupId>
<artifactId>Mythic-Dist</artifactId>
<version>5.2.1</version>
<scope>provided</scope>
</dependency>
Examples
1) 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();
}
2) Check BukkitEntity for MythicMob
ActiveMob mythicMob = MythicBukkit.inst().getMobManager().getActiveMob(bukkitEntity.getUniqueId()).orElse(null);
if(mythicMob != null && mythicMob.getName().equals("SkeletalKnight")){
// do something with mob
}
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:
Events
< 100% 30% > | |
Event | Description |
MythicReloadedEvent | Called when the plugin is reloaded |
MythicMobSpawnEvent | Called when a MythicMob spawns |
MythicMobDeathEvent | Called when a MythicMob dies |
MythicMobDespawnEvent | Called when a MythicMob despawns without dying |
MythicMobLootDropEvent | Called right before a loot table is generated |
MythicConditionLoadEvent | Called when a custom condition is loaded |
MythicDropLoadEvent | Called when a custom drop is loaded |
MythicMechanicLoadEvent | Called when a custom mechanic is loaded |
MythicTargeterLoadEvent | Called when a custom targeter is loaded |