Enchantment Command Manifest
Admin command for giving custom enchantment books
Registers the admin command for the enchantment system through the engine's [CustomCommandEntry] pipeline: /{commandName} give <player> <enchant> [level].
Champs
| Champ | Type | Par défaut | Description |
|---|---|---|---|
commandName | String | enchantcreator | Name of the admin command |
adminPermission | String | enchantcreator.admin | Permission required to use the command |
playerNotFound | String | Player '{player}' is not online. | Message sent when the target player is not online (placeholder: {player}). MiniMessage is supported |
enchantmentNotFound | String | Unknown enchantment '{enchant}'. | Message sent when no enchantment matches the given name (placeholder: {enchant}). MiniMessage is supported |
bookGiven | String | Gave {enchant} {level} to {player}. | Message sent when the book has been given (placeholders: {player}, {enchant}, {level}). MiniMessage is supported |
How to use it
Create this entry to register the admin command /enchantcreator give <player> <enchant> [level]. Change commandName and adminPermission (default enchantcreator.admin) if needed. The player must be online. <enchant> is the name or displayName of a definition, written in lower-case with underscores in place of spaces. The level cannot exceed the definition's maxLevel. If the inventory is full, the book is dropped at the player's feet. The three messages (playerNotFound, enchantmentNotFound and bookGiven) are the only texts the command sends: nothing is written in the code, so you can reword or translate them in the web panel. They accept MiniMessage formatting. playerNotFound accepts {player}, enchantmentNotFound accepts {enchant}, and bookGiven accepts {player}, {enchant} and {level}. What is typed in the command (the player name and the enchantment name) is always shown as typed: a MiniMessage tag such as <red> in it is displayed literally and is not applied. Formatting written in the messages themselves, or in the enchantment displayName, still applies.