Back to mods
Class API project artwork

CurseForge · Minecraft mod

Class API

Library mod

Choose a version Pick your version below, then grab the matching file.

Quick answer

Which Class API release should I use?

Updated 11 days ago
Latest stable file class_api-1.0.1.jar
Game version 1.20.1
Loader Forge

Class API class_api-1.0.1.jar targets 1.20.1 with Forge. The project page does not say whether this file belongs on the client, dedicated server, or both. No extra mods listed for this file.

Where it goes

Is Class API required on the client, server, or both?

The project page does not say whether this file belongs on the client, dedicated server, or both.

Client Source doesn’t say
Dedicated server Source doesn’t say
Loader for this release Forge
Required install it here Optional supported, not mandatory Not supported do not install here Source doesn’t say do not assume

The source does not explicitly classify this release as client-only or server-only.

What else does Class API class_api-1.0.1.jar need?

class_api-1.0.1.jar. Change the file and its required mods may change too.

No extra mods listed for this file

This file does not list any required mods. Do not add a library just because a different file uses it.

This file does not list any required or optional mods.

Before you install it

Add Class API without breaking your instance.

Built for Class API class_api-1.0.1.jar. Pick another file and the loader, install side or required mods may change.

  1. 01

    Stick to this file

    Use class_api-1.0.1.jar. It targets 1.20.1 with Forge; another release may have different loader, side or dependency requirements.

  2. 02

    Bring the mods it needs

    This file does not list any required mods. Do not add a library just because a different file uses it.

  3. 03

    Put it on the correct side

    The project page does not say whether this file belongs on the client, dedicated server, or both.

  4. 04

    Pick the file you checked

    Use the “Get this file” button beside class_api-1.0.1.jar. It opens that exact file at the source.

About this project

What does Class API add?

Patreon

A small library mod for player classes.
It doesn't add anything by itself. If a mod like Class Enhancement asks for it, install it and forget about it.

Forge 1.20.1 | Client & Server


For players

NOTHING for you here.

For mod devs

One class mod installs itself as the provider. Everyone else just calls the API. If no provider is installed, every call is safe and returns nothing, so you can soft-depend on it!

Look things up
  • ClassApi.classOf(player), idOf, is(player, "knight"), hasClass
  • ClassApi.classes() and find(id) give you the full class: name, colour, tags, stats, attributes, kit, skill, passives and a free-form data tag
  • assign, clear, respec and openSelection on the server
Skills and passives

Register code under an id. A class JSON points at that id, and the class mod handles the key, cooldown and HUD.

ClassFeatures.registerSkill(new ResourceLocation("yourmod", "shield_wall"), ctx -> {
    ctx.player().addEffect(new MobEffectInstance(MobEffects.DAMAGE_RESISTANCE, 60, 4));
    ctx.startCooldown();
    return true;
});
"skill": { "id": "yourmod:shield_wall", "name": "Shield Wall", "cooldown": "90s" }
  • Skills get activate, tick, equip and unequip. They can also report stacks, a meter or an active state for the HUD.
  • Passives get tick, equip and unequip.
  • ctx.params() hands you whatever numbers the JSON put in params, so one skill can be tuned per class.
  • Cooldowns: startCooldown, reduceCooldown, clearCooldown, from inside the skill or through ClassApi.skill(player).
Events
  • ClassChangeEvent.Pre (cancelable) and Post, with the old class, the new one and the cause
  • ClassKitEvent: cancel the kit or add items to it
  • ClassAvailabilityEvent: lock a class with a reason, or hide it
  • SkillActivateEvent: cancel a skill use
Client hooks
  • ClassClientHooks.beforeSelection and afterSelection: put your own screen before or after the class pick
  • skillDisplay: change a skill's HUD name or icon, or draw on screen while it's active

Want a strong Minecraft server? Support me by buying through this link: Kinetic Hosting

Project description from CurseForge.

Pick your setup

Class API by Minecraft version and loader

Choose the version and loader you play, then open the matching release.

1 available setups

Check the dependencies, then try the file in a copied instance before changing a world you care about.

Recent files

Class API versions and loaders

2 of 2 releases match

Looking for an older file? The official CurseForge project page is in Resources.