Commands
Base alias: /pack, registered as PackCommand (ACF BaseCommand) through AstralCore's VelocityCommandManager. The class carries @CommandPermission("pack.command"), which applies to every subcommand. All three commands accept any CommandSource — console included; none is player-only.
Subcommand | Permission | Description |
|---|---|---|
|
| Re-sends a pack to one online player. |
|
| Re-computes the pack's hash and pushes it to every player on the proxy. |
|
| Re-reads |
/pack <player> <pack>
Permission: pack.command (class-level only). The @Default handler takes an OnlinePlayer and a PackBlueprint; completion is @CommandCompletion("@players @packs"). Calls plugin.sendPack(player, blueprint) — the non-forced path, which does not call removeResourcePacks first. Replies green Sent resource pack to <username>.
The method's @Syntax("<player>") annotation is stale: the handler takes two arguments, so the real usage is /pack <player> <pack>.
/pack update <pack>
Permission: pack.command.update, on top of the class-level pack.command. Completion @packs.
Replies gray Updating resource pack..., captures the current computed pack's id, then calls AstralPack#updatePack, which logs Updating resource pack hash for id: {}, generates a fresh cache key, re-runs computeHashAndBuild() against url + "?cacheKey=" + cacheKey, swaps the entry in computedPacks (removing any entry with the same blueprint id, then adding the new one), and logs Resource pack hash updated for id: {}. On completion it iterates every player on the proxy, calling removeResourcePacks(oldId) followed by the forced sendPack(player, pack, true) — which removes the new id as well before sending. Replies green Resource pack updated successfully.; on failure it replies red Failed to update resource pack. Check console for details. and logs Failed to update resource pack.
The old and new pack ids are the same UUID unless the blueprint's url changed, since both are UUID.nameUUIDFromBytes(url.getBytes()). The re-download is driven by the new ?cacheKey=, not by a new pack id.
/pack reload
Permission: pack.command.reload, on top of the class-level pack.command. No arguments, no completion.
Replies gray Reloading resource pack configuration..., calls plugin.loadConfiguration() — which re-reads config.yml, clears computedPacks, and kicks off one asynchronous hash computation per blueprint — then replies green Resource pack configuration reloaded successfully. immediately. Success is reported synchronously, before any hash has finished recomputing. On a thrown exception it replies red Failed to reload resource pack configuration. Check console for details. and logs Failed to reload resource pack configuration.
For the few seconds after a reload, computedPacks is empty: the configuration-phase listener sends nothing, /pack <player> <pack> sends nothing but still replies green (it only logs No computed pack found for blueprint id: <id>), and /pack update throws. Already-connected players are not re-prompted — packs only re-apply the next time they pass through the configuration phase.
Permission summary
Node | Grants |
|---|---|
| Class-level node; required by every |
|
|
|
|
Ordinary players need no permission — packs are applied automatically by the listener, not by a command.
Tab completion
@packs is registered by AstralPack#onEnable as PackBlueprintCompletionHandler; it returns every configured blueprint's id() and does no prefix filtering of its own (ACF filters). @players is ACF's built-in online-player completion.
The <pack> argument is resolved by PackBlueprintContextResolver, which pops the first argument and returns the first blueprint whose id() equalsIgnoreCase it, otherwise throwing InvalidCommandArgument("No pack found with name: <input>"), shown to the sender. The resolver reads the configuration, so an id that exists in config.yml resolves fine even if its pack never finished computing.
See also
Configuration — where pack ids, URLs and groups are defined.
Overview — what "computed" means and why a pack may be missing.