AstralClasses Overview
AstralClasses is a Paper plugin that provides character class progression for the AstralRealms network. Players select a class (such as mage or knight), which grants them a weapon item and up to four abilities bound to input actions. Abilities are bound to skill IDs that live in AstralSkill; AstralClasses is the input binding and progression layer, not the skill engine.
What it does
Class selection menu (via
/class) displays available classes and player progress.Weapon items are unique items associated with each class, resolvable through the
classes.weaponitemstack supplier and matched back to a class viaClassService.findByWeaponItem(). Equipping a class (theequip-classaction) only updates the player's selected class — handing out the physical weapon item is left to menus/actions.Abilities (up to 4 per subclass) are bound to input actions —
LEFT_CLICK,RIGHT_CLICK,SWAP_HANDS,DROP,SPACE,SNEAK, or hotbar slots (HOTBAR_1throughHOTBAR_8).Skill resolution receives an input, resolves it to an ability ID, then looks up the bound skill ID and triggers the skill via AstralSkill's
SkillAPI.service().castAtPos().Progression tracking stores per-player class selection, unlocked classes, level, experience, per-ability skill levels, and boost flags.
Subclasses allow multiple ability sets per class; the default subclass is named
default.Double jump is a built-in traversal feature, configurable per server group via
double-jump-enable-groups.Per-group gating restricts skills to designated server groups using
skill-enable-groups. Double jump has its owndouble-jump-enable-groupskey, but it is only checked for groups that already pass theskill-enable-groupsgate — see Configuration.
Requirements
Dependency | Required | Notes |
|---|---|---|
Paper 1.21 | Yes | — |
AstralCore | Yes | Configuration, menus, actions, placeholders, context resolvers. |
packetevents | Yes | Input packet interception (clicks, sneaks, hand swaps, hotbar). |
AstralStats | Yes | Attack-speed stat used for cooldown scaling. |
AstralSync | Yes | Player-data persistence via |
AstralSkill | Soft ( | Skills are cast by ID via |
AstralHud | Soft | Optional display integration. |
Architecture at a glance
Services and Components
Service | Responsibility |
|---|---|
| Loads class definitions from |
| Triggers skills via input events. Manages |
| Loads and opens the classes-main menu. |
Listener | Trigger |
|---|---|
| PacketEvents hook; decodes |
| A separate Bukkit listener: calls |
| Cleanup and player-specific hooks. |
| Loaded from |
Player Data
Persistence is handled by ClassPlayerData, persisted by the ClassSnapshotAdapter registered with AstralSync under key astralclasses:player_data. Per-player data includes:
Selected class ID
Unlocked class IDs
Per-class
ClassProgressData(level, experience, per-ability skill levels, boost flags, subclass selection)Input bindings (mapping
InputType→ ability ID)Class settings (e.g., toggle auto-attack)
Registered Surfaces
Type | Name | Notes |
|---|---|---|
Command |
| Base commands (aliases). |
Command modifier |
| Argument modifier for commands. |
Placeholder |
| Namespaces under the |
ItemStack supplier |
| Resolved via |
Action |
| Registered globally with AstralCore. |
Completion |
| Lists |
Context |
| For command argument resolution. |
API |
| Static accessors; see Developer API. |
Cross-Product Note: Skills
Skills themselves (cast behaviour, projectiles, impacts, damage calculation) are defined and documented in AstralSkill. AstralClasses only references skills by string ID and calls the AstralSkill service to cast them. For skill DSL details, mechanics, and trigger types, refer to the AstralSkill documentation.