Commands
Base aliases: /pets, /pet, /familiers, /familier. A second, standalone base command /pokedex (aliases /animalerie, /bestiaire) opens the bestiary menu.
Command | Permission | Completion | Description |
|---|---|---|---|
| — | — | Open the main pet menu. Player-only. |
|
|
| Mail a built pet item to |
|
|
| Mail a built food item to |
|
|
| Wipe |
|
| — | Reload configuration and data. |
| — | — | Open the bestiary menu of all blueprints. Player-only. |
/pets
Permission: none. Player-only — the handler method takes a Player, not a CommandSender.
The @Default subcommand opens the plugin's main pet menu (AstralPets#menus().openMainMenu(player)).
/pets give <player> <blueprint>
Permission: pets.give. Syntax: <player> <blueprint>. Works from console (the handler takes a CommandSender, and the target is resolved as an OnlinePlayer — it must currently be online).
Builds an item stack for blueprint — a fresh Pet instance with a new UUID at its blueprint's base state — via PetService#buildItemStack(PetBlueprint), then delivers it through AstralCore's mailbox system (MailboxService#giveOrAdd), so the item reaches the target even without inventory space. On success the sender gets give-success; on failure (mailbox delivery error, or any exception while building the item) the sender gets give-failed and the error is logged to console.
/pets food <player> <blueprint>
Permission: pets.give.food. Syntax: <player> <blueprint>. Same console/online-target rules as give.
Builds an item stack for blueprint via FoodBlueprintService#buildItemStack(FoodBlueprint) and delivers it the same way through MailboxService#giveOrAdd. Reports give-food-success or give-food-failed to the sender; failures are logged to console. See Pet Food for what a food blueprint does.
/pets reset <player>
Permission: pets.reset. Syntax: <player>. player is resolved as an OnlinePlayer — the target must be online, since their PetPlayerData is only resolvable through SyncAPI.findData while loaded in memory.
If found, calls PetPlayerData#clear() — empties the player's owned pets list, clears their set of active pet ids, and unselects the currently-selected pet — and confirms with a plain (non-MessageEnum) chat message: Successfully reset pets data for player <name>. If the data isn't found, the sender gets Failed to reset pets data: data not found for player <name> and the failure is logged to console.
/pets reload
Permission: pets.reload. No arguments; works from console.
Calls AstralPets#loadConfiguration(), which reloads, in order:
config.ymlandrarities.yml.messages.yml.Pet blueprints and food blueprints (
BlueprintService#load()/FoodBlueprintService#load()).Menus and dialogs.
The pet and food item suppliers.
The sender gets reloading first, then reloaded-successfully on success or reload-failed (with a stack trace to console) on failure.
/pokedex
Permission: none. Player-only.
Registered as its own base command (@CommandAlias("pokedex|animalerie|bestiaire")), not a subcommand of /pets. The @Default subcommand opens the pokedex/bestiary menu (AstralPets#menus().openPokedexMenu(player)), which lists every loaded pet blueprint.
Blueprint arguments
<blueprint> in /pets give and <blueprint> in /pets food are resolved through ACF context resolvers, not plain strings:
PetBlueprint—PetBlueprintContextResolverpops the next argument and looks it up withAstralPets#blueprints().findById(id); an unknown id throwsInvalidCommandArgument("No pet blueprint found with id:<id>"). Tab completion (@petBlueprints) listsAstralPets#blueprints().ids()— the ids of every loaded pet blueprint.FoodBlueprint—FoodBlueprintContextResolverlooks it up withAstralPets#foodBlueprints().findById(id), failing the same way for an unknown id. Tab completion (@foodBlueprints) listsAstralPets#foodBlueprints().ids()— the ids of every loaded food blueprint.
Both id sets are populated at load (and on /pets reload) from the files under blueprints/ and the plugin's food/ blueprint folder respectively; an id is whatever key the blueprint file registers under.
Permission summary
Node | Grants |
|---|---|
|
|
|
|
|
|
|
|