Myths and Legends Commands
This page documents the commands provided by the Myths and Legends mod. All commands start with the base command `/mythsandlegends` or its alias `/mal`.
Access to these commands is generally restricted by Permissions. Most commands require at least the base access permission (`mythsandlegends.command.base`). Specific subcommands often require additional, more specific permissions.
General Structure
/mythsandlegends <subcommand> [arguments...]
or
/mal <subcommand> [arguments...]
Many commands allow specifying an optional `[player]` argument to target another player. If omitted, the command typically targets the player executing the command.
Command List
items
Lists the tracked key items held by a player according to the mod's data.
Syntax
/mal items [player]
Arguments
[player]
: (Optional) The name of the player whose items should be listed. Defaults to the command executor.
Permissions
- `mythsandlegends.command.items`
Description
Retrieves the list of key items (like those defined in items) that the mod has registered for the target player. This relies on the mod's internal tracking, which is updated via `syncitems`.
syncitems
Synchronizes the player's inventory with the mod's tracked key item data.
Syntax
/mal syncitems [player]
Arguments
[player]
: (Optional) The name of the player whose inventory should be synchronized. Defaults to the command executor.
Permissions
- `mythsandlegends.command.syncitems`
Description
Scans the target player's inventory for items defined as key items by the mod and updates the mod's internal list of which key items the player possesses. This should be run if items were added or removed through means other than standard gameplay interactions tracked by the mod.
party
Lists the Pokémon currently in a player's party.
Syntax
/mal party [player]
Arguments
[player]
: (Optional) The name of the player whose party should be listed. Defaults to the command executor.
Permissions
- `mythsandlegends.command.party`
Description
Displays the species and nicknames of the Pokémon in the target player's Cobblemon party.
haspokemon
Checks if a player has a specific Pokémon species in their party.
Syntax
/mal haspokemon <pokemon_species> [player]
Arguments
<pokemon_species>
: (Required) The name of the Pokémon species to check for (e.g., `pikachu`, `mewtwo`). Must be a valid species name.[player]
: (Optional) The name of the player whose party should be checked. Defaults to the command executor.
Permissions
- `mythsandlegends.command.haspokemon`
Description
Checks the target player's current Cobblemon party for the presence of the specified Pokémon species and reports whether it was found.
placeifhas
Places a block at a specific location *only if* a target player has a specific Pokémon in their party.
Syntax
/mal placeifhas <pokemon_species> <pos> <block> [player]
Arguments
<pokemon_species>
: (Required) The name of the Pokémon species required in the player's party.<pos>
: (Required) The block coordinates (X Y Z) where the block should be placed.<block>
: (Required) The block state to place (e.g., `minecraft:stone`, `minecraft:redstone_block[powered=true]`).[player]
: (Optional) The name of the player whose party is checked. Defaults to the command executor.
Permissions
- `mythsandlegends.command.placeifhas`
Description
This command first checks if the target player has the specified `<pokemon_species>` in their party. If they do, the command attempts to place the specified `<block>` at the given `<pos>`. If the player does not have the Pokémon or the block placement fails, an error message is shown.
settings
Opens the Myths and Legends configuration GUI for the player executing the command.
Syntax
/mal settings
Arguments
- None
Permissions
- `mythsandlegends.command.base` (or potentially a specific settings permission)
Description
Opens a graphical user interface allowing the player to view and potentially modify mod configuration settings, provided they have the necessary permissions. This requires the mod to be installed on the client.
cooldown
Manages item usage cooldowns and voucher counts.
check
Checks the current cooldown and voucher status for a specific item for a player.
Syntax
/mal cooldown check <item> [player]
Arguments
<item>
: (Required) The identifier of the key item to check (e.g., `mythsandlegends:azure_flute`).[player]
: (Optional) The name of the player whose cooldown status should be checked. Defaults to the command executor.
Permissions
- `mythsandlegends.command.cooldown.check`
Description
Displays how many times the target player has used the specified item (voucher count), the maximum allowed uses (based on config), the remaining cooldown time before the next use is allowed, and whether the player can currently use the item (considering both vouchers and cooldown). Also indicates if global cooldowns/vouchers are affecting the status.
clear
Clears the cooldown and usage history for a *specific* item for a player.
Syntax
/mal cooldown clear <item> [player]
Arguments
<item>
: (Required) The identifier of the key item whose cooldown should be cleared.[player]
: (Optional) The name of the player whose cooldown should be cleared. Defaults to the command executor.
Permissions
- `mythsandlegends.command.cooldown.clear`
Description
Resets the usage timestamps and effectively the voucher count and cooldown for only the specified `<item>` for the target player.
clearall
Clears *all* item cooldowns and usage history for a player.
Syntax
/mal cooldown clearall [player]
Arguments
[player]
: (Optional) The name of the player whose cooldowns should be cleared. Defaults to the command executor.
Permissions
- `mythsandlegends.command.cooldown.clearall`
Description
Resets all usage timestamps for all tracked key items for the target player, effectively resetting all their cooldowns and voucher counts.
forcespawn
Attempts to trigger a Pokémon spawn associated with a specific key item.
Syntax
/mal forcespawn <keyitem> [player] [consumeVoucher] [ignoreCooldown]
Arguments
<keyitem>
: (Required) The identifier of the key item used to trigger the spawn (e.g., `mythsandlegends:mystic_ticket`).[player]
: (Optional) The name of the player for whom the spawn should be triggered. Defaults to the command executor.[consumeVoucher]
: (Optional Boolean) If `true`, attempts to consume a voucher/use count for the item. Defaults to `false`.[ignoreCooldown]
: (Optional Boolean) If `true`, ignores any existing cooldown for the item. Defaults to `false`.
Permissions
- `mythsandlegends.command.forcespawn`
Description
Initiates the force spawning logic tied to the specified `<keyitem>` for the target player. This typically involves checking player location, cooldowns, and voucher counts unless overridden by the optional arguments. Success depends on configured spawning conditions and whether the checks pass. The optional arguments allow administrators to bypass normal usage restrictions.
Error Messages
Commands provide feedback messages for success and failure. Common error types include:
- Player not found.
- Command requires a player executor (cannot be run from console without specifying a player).
- Invalid Pokémon species name provided.
- Invalid or untracked key item identifier provided.
- Failure to place a block.
- Cooldown active or insufficient vouchers for `forcespawn`.
- Conditions for `forcespawn` (e.g., location) not met.
These messages use translatable keys for localization.
Translatable Text Keys
The following text keys are used by the commands in this class for user feedback and errors:
- `commands.mythsandlegends.error.requires_player`
- `commands.mythsandlegends.error.player_not_found`
- `commands.mythsandlegends.error.invalid_species`
- `commands.mythsandlegends.error.invalid_key_item`
- `commands.mythsandlegends.error.invalid_cooldown_item`
- `commands.mythsandlegends.error.item_not_tracked`
- `commands.mythsandlegends.items.none`
- `commands.mythsandlegends.items.success`
- `commands.mythsandlegends.syncitems.success`
- `commands.mythsandlegends.party.none`
- `commands.mythsandlegends.party.success`
- `commands.mythsandlegends.haspokemon.yes`
- `commands.mythsandlegends.haspokemon.no`
- `commands.mythsandlegends.placeifhas.failure_condition`
- `commands.mythsandlegends.placeifhas.failure_setblock`
- `commands.mythsandlegends.placeifhas.success`
- `commands.mythsandlegends.forcespawn.success`
- `commands.mythsandlegends.forcespawn.success_no_spawn`
- `commands.mythsandlegends.settings.success`
- `commands.mythsandlegends.cooldown.check.global_note`
- `commands.mythsandlegends.cooldown.check.global_vouchers`
- `commands.mythsandlegends.cooldown.check.status`
- `commands.mythsandlegends.cooldown.check.can_use`
- `commands.mythsandlegends.cooldown.check.cannot_use`
- `commands.mythsandlegends.cooldown.clear.success`
- `commands.mythsandlegends.cooldown.clearall.success`