RPGMobs-api artifact so your mod only depends on the lightweight API interfaces, not the full plugin.
Setup
Dependency
Add the API JAR as a compile-only dependency in yourbuild.gradle:
-javadoc.jar and -sources.jar are available as additional downloads. Place all three in your libs/ folder for full IDE support (autocomplete, inline docs, click-to-source).
Mod Manifest
Declare RPGMobs as a dependency in your mod’smanifest.json so Hytale loads it before your mod:
Entry Point
All API access goes through the staticRPGMobsAPI class:
RPGMobsNotInitializedException.
Event System
ImplementIRPGMobsEventListener and override the events you care about. All handler methods have default no-op implementations, so you only need to override what you use.
Available Events
Base Event Fields
Every event extendsRPGMobsEvent which provides:
getWorld()- theWorldin which the event occurred (since 1.1.0)getEntityRef()- the RPG mob’sRef<EntityStore>getEntityUuid()- the entity’sUUID, ornullif unavailable (since 1.1.0)getTier()- zero-based tier index (0 = Tier 1, 4 = Tier 5)getRoleName()- the NPC role identifier (e.g."Skeleton_Frost_Knight")
Cancelling Events
Events that implementICancellable can be cancelled to prevent the action:
RPGMobsSpawnedEvent, RPGMobsDropsEvent, RPGMobsDamageDealtEvent, RPGMobsAbilityStartedEvent.
Query API
The Query API provides read-only access to any RPG mob’s current state. Access it viaRPGMobsAPI.query().
Identity
Scaling
Progression
Combat
Summons
Query Examples
Check if an entity is an elite and read its tier
Read scaling values for a HUD or tooltip
Check combat state and current target
Read distance-based progression bonuses
Monitor summoned minions
Inspect combat state (since 1.2.0)
Filter minion deaths
Ability IDs
Abilities are identified by string IDs passed in ability events (RPGMobsAbilityStartedEvent, RPGMobsAbilityCompletedEvent, RPGMobsAbilityInterruptedEvent). The built-in ability IDs are:
Example: Full Integration
Spawn API (since 1.3.0)
The Spawn API lets other mods programmatically create RPGMobs elites. Access it viaRPGMobsAPI.spawn().
Quick Reference
Parameters:
Weapon Categories
Pass one of these exact strings asweaponCategory to force the elite to spawn with that weapon type. Pass null to let RPGMobs pick based on the mob rule’s configured categories.
Ranged weapon categories use vanilla Hytale AI instead of the CAE combat system.
Spawn a New Elite
Elite-ify an Existing NPC
If you already spawned an NPC viaNPCPlugin and want to promote it:
Force a Weapon Category
Handle Failures
SpawnResult is a sealed interface. Check success or match on the failure reason:
Threading
All spawn methods must be called on the world’s thread. From other threads, wrap inworld.execute():
Thread Safety
Event callbacks are dispatched from the server’s main tick thread. Do not perform blocking I/O or long-running computations inside event handlers. If you need async processing, queue work to a separate thread and return immediately. The Query API reads component data from the entity store and should only be called from contexts where the store is accessible (event handlers, tick systems, orworld.execute() callbacks).