Commands
Base command: /class (aliases: /classes, /classe).
AstralClasses registers commands across two BaseCommand classes that ACF merges under the same alias: ClassCommand (default, reload, toggle, reset subcommands) and ModifierCommand (the modifier subcommand). Each command carries its own @CommandPermission — see the Permission summary.
Core Commands
Command | Description | Permission | Scope |
|---|---|---|---|
| Open the class-selection menu. |
| players only |
| Reload class configurations and services. |
| any |
| Toggle auto-attack setting. |
| players only |
| Reset a player's class data to default. |
| any |
/class
Permission: class.command.open
Players only.
Opens the class-selection menu (classes-main) for the executing player. By design, this command is a no-op on the tower server group and does not display the menu.
/class reload
Permission: class.command.reload
Console or player.
Reloads config.yml and re-runs ClassService.load() and MenuService.load() — re-reading classes/*.yml and the menus from disk (the same load path used on startup). Also reloads the weapon class item supplier.
SkillService.load() (which re-reads double-jump.yml) only runs if the SkillService was already constructed at plugin startup — i.e. the server's group was in skill-enable-groups when the plugin enabled. /class reload cannot newly enable the skill/ability system for a group that started up without it; changing skill-enable-groups to add a group requires a full plugin/server restart.
The command reports progress:
Sends
Reloading class configurations...(gray) immediately.Calls
AstralClasses#loadConfiguration().On success, sends
Class configurations reloaded successfully.(green). On exception, sendsAn error occurred while reloading configurations.(red) and logs the error to SLF4J.
/class toggle
Permission: class.command.toggle
Players only.
Toggles the calling player's auto-attack setting (classSettings.toggleAutoAttack), which controls whether attacks are automatic or manual.
On success, sends Auto attack toggled on. or Auto attack toggled off. (green).
/class reset <player>
Permission: class.command.reset
Any sender (console or player).
Resets the target player's ClassPlayerData to the default class at starting level.
Accepts player name completion via @players.
/class modifier
Permission: class.command.modifiers
An admin/debug utility that applies a stat modifier to an online player through AstralStats' StatsAPI, without going through a class or skill definition. It constructs an EnumBasedStatModifier<InputType> and applies it via StatsAPI.addModifier(target, statKey, modifier).
Arguments
Argument | Type | Resolution |
|---|---|---|
| online player | ACF's built-in |
|
| Resolved by |
|
| Also resolved by |
|
| The modifier's magnitude. |
|
| One of |
|
| One of |
The modifier is created as an EnumBasedStatModifier<InputType>, which only applies when the raw context object passed to a StatsAPI.stat(...) call is an InputType equal to the inputType argument — it is otherwise inert. CooldownManager.recordUsage() looks up ATTACK_SPEED this way — StatsAPI.stat(player, StatType.ATTACK_SPEED.key(), inputType) — passing the triggering InputType as context, so a modifier added here only affects cooldown scaling for casts made through that specific input (e.g. only LEFT_CLICK casts). Two fields are fixed and not configurable: source is always ModifierSource.OTHER and slot is always EquipmentSlot.SADDLE.
On success, echoes:
Example
Tab completion
AstralClasses#onEnable registers a completion handler named inputType that lists every InputType enum constant by name — it drives completion for the command's trailing inputType argument.
Permission summary
Node | Grants |
|---|---|
|
|
|
|
|
|
|
|
|
|