Health API
Health API
- MonsterApocalypse.setHpHandledExternally(boolean setting)
- Sets whether Monster Apocalypse should process damage events, or leave your plugin to do all of the hp updating.
- MonsterApocalypse.getHealthManager()
- Returns the instance of the health manager.
- healthmanager.addmob(LivingEntity ent)
- Adds a freshly spawned mob to the health manager map with Monster Apocalypse defined health values.
- healthmanager.removemob(Entity ent)
- Removes a mob from the health map, generally not useful.
- healthmanager.damagemob(LivingEntity ent, int dmg)
- Subtracts <dmg> from the mob's current hp, returns the new value.
- If the mob is not mapped, adds it, sets its hp to the Monster Apocalypse max minus current vanilla damage taken, and returns the current hp.
- healthmanager.getmobhp(LivingEntity ent)
- Returns the mob's current HP.
- healthmanager.setmobhp(LivingEntity ent, int amount)
- Sets the mob's hp to <amount>.
Comments