Astral Realms Documentation Help

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

/class

Open the class-selection menu.

class.command.open

players only

/class reload

Reload class configurations and services.

class.command.reload

any

/class toggle

Toggle auto-attack setting.

class.command.toggle

players only

/class reset <player>

Reset a player's class data to default.

class.command.reset

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

/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:

  1. Sends Reloading class configurations... (gray) immediately.

  2. Calls AstralClasses#loadConfiguration().

  3. On success, sends Class configurations reloaded successfully. (green). On exception, sends An error occurred while reloading configurations. (red) and logs the error to SLF4J.

/class reload

/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 toggle

/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 reset <player>

/class modifier

Permission: class.command.modifiers

/class modifier <player> <key> <stat> <value> <modifierType> <inputType>

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

player

online player

ACF's built-in OnlinePlayer context — must be online.

key

Key (namespaced)

Resolved by KeyContextResolver; parsed with Key.key(input). This is the modifier's own identifying key (used later to remove it via StatsAPI.removeModifier), not the stat.

stat

Key (namespaced)

Also resolved by KeyContextResolver. The target stat's key, e.g. astralstats:attack_speed.

value

double

The modifier's magnitude.

modifierType

ModifierType enum

One of FLAT, RELATIVE, PERCENTAGE — how value is applied to the base stat.

inputType

InputType enum

One of SPACE, SNEAK, LEFT_CLICK, RIGHT_CLICK, DROP, SWAP_HANDS, HOTBAR_1 through HOTBAR_8 — the input trigger this modifier applies to.

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:

Added modifier to <player>: <key> -> <stat> = <value> (<modifierType>, <inputType>)

Example

/class modifier Notch astralclasses:debug-boost astralstats:attack_speed 0.5 PERCENTAGE LEFT_CLICK

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

class.command.open

/class menu access.

class.command.reload

/class reload.

class.command.toggle

/class toggle.

class.command.reset

/class reset.

class.command.modifiers

/class modifier.

See also

Last modified: 25 July 2026