LovelyEnchant
LovelyEnchant is a Purpur 1.21.11 enchantment shop plugin built for Java 25. It replaces the vanilla enchanting table flow with a configurable GUI shop, supports enchanted book purchases, includes disenchant refunds, and adds a risky enchantment gambler.
Requirements
- Purpur
1.21.11 - Java
25 - Vault
- A Vault-compatible economy plugin, such as EssentialsX
This build is intentionally targeted at Purpur 1.21.11 and Java 25 only.
Features
- Enchant Shop GUI:
/eshopopens a menu where players can safely buy enchantments for the item in their hand. - Vanilla Table Redirect: right-clicking an enchanting table opens the
/eshopmenu instead of the vanilla enchanting table. - Enchanted Books: holding a normal book lets players buy enchanted books, with a separate configurable book price multiplier.
- Book Toggle: Enchanted book purchases can be enabled or disabled in config or through the admin dialog editor.
- Enchantment Gambler: players can risk all current enchantments on an item for a chance to win a random new enchantment.
- Extra Enchant Jackpot: successful gambles can roll a second random enchantment.
- Disenchant GUI:
/disenchantremoves selected enchantments and refunds part of the configured price. - Admin Enchanter:
/enchanter <player> <enchant> <level>applies any enchantment to a player's held item. - Dialog API Admin Editor:
/eshopadmin editor/esaopens an in-game Paper/Purpur dialog editor for live settings. - JSON Configuration: costs, messages, sounds, permissions mode, blacklist, max levels, gambler chances, and refunds are configurable.
Installation
- Stop the server.
- Install Vault and a Vault-compatible economy plugin.
- Place
LovelyEnchant-1.0.0.jarin the serverpluginsfolder. - Start the server once to generate:
plugins/LovelyEnchant/config.json
- Edit the config manually or use
/esa. - Run
/eshop reloadafter manual config edits.
If you are migrating from an old EnchantShop config, delete the old generated config first so the new LovelyEnchant options can generate.
Commands
| Command | Description | Permission |
|---|---|---|
/eshop |
Opens the main shop menu. | lovelyenchant.open |
/eshop reload |
Reloads config.json. |
lovelyenchant.reload |
/eshopadmin edit |
Opens the Dialog API admin editor. | lovelyenchant.edit |
/esa |
Alias for the admin editor. | lovelyenchant.edit |
/disenchant |
Opens the disenchanting GUI. | lovelyenchant.disenchant |
/enchanter <player> <enchant> <level> |
Adds an enchantment to a player's held item. | lovelyenchant.enchanter |
Legacy enchantshop.* permission nodes are still accepted for compatibility.
Permissions
| Permission | Default | Description |
|---|---|---|
lovelyenchant.open |
true | Allows /eshop and enchanting table redirect access. |
lovelyenchant.disenchant |
true | Allows /disenchant. |
lovelyenchant.reload |
op | Allows /eshop reload. |
lovelyenchant.enchanter |
op | Allows /enchanter. |
lovelyenchant.edit |
op | Allows /eshopadmin edit and /esa. |
lovelyenchant.buy.* |
op | Allows buying any enchantment when per-enchant permissions are enabled. |
lovelyenchant.buy.<enchant_name> |
false | Allows buying one enchantment when per-enchant permissions are enabled. |
lovelyenchant.admin |
op | Grants reload, enchanter, edit, open, and wildcard buy permissions. |
Example per-enchant node:
lovelyenchant.buy.sharpness
Player Guide
Buying Enchantments
- Hold an enchantable item.
- Run
/eshop, or right-click an enchanting table. - Click Cường hóa.
- Choose an enchantment.
- Choose a level.
- Pay the configured price.
Buying Enchanted Books
- Hold a normal book.
- Run
/eshop. - Click Cường hóa.
- Choose an enchantment and level.
- One book is consumed, and an enchanted book is added to the inventory.
If enchantedBooksEnabled is false, players cannot create enchanted books.
Gambling Enchantments
- Hold an item that already has at least one enchantment.
- Run
/eshop. - Click Cược vật phẩm.
- On success, the item gains a random new enchantment.
- On a jackpot, the item gains one extra random enchantment.
- On failure, all enchantments on the item are removed.
Disenchanting
- Hold an enchanted item.
- Run
/disenchant. - Click the enchantment to remove.
- The enchantment is removed, and the player receives the configured refund.
Admin Editor
Run:
/esa
or:
/eshopadmin edit
The admin editor uses the Paper/Purpur Dialog API and saves changes directly to config.json.
Current editor panels:
- Economy & Books: cost formula, book purchases, book multiplier, enchanting table redirect, per-enchant permissions.
- Gambler: win chance and extra enchant chance.
- Disenchant: refund percentage.
- Menu Titles: GUI titles.
- Sounds: success, fail, and gamble sounds.
- Enchant Cost: set one enchantment base cost.
- Enchant Rules: set one enchantment max-level override and blacklist state.
- Message Text: edit any message key.
- Reload Config: reload config from disk.
Configuration
Config path:
plugins/LovelyEnchant/config.json
Generated defaults:
{
"costFormula": "base_cost * (level * level)",
"enchantmentBaseCosts": {
"minecraft:sharpness": 1000.0,
"minecraft:protection": 1200.0,
"minecraft:efficiency": 800.0,
"minecraft:unbreaking": 1500.0,
"minecraft:mending": 10000.0
},
"mainMenuTitle": "&8Menu chính",
"enchantSelectTitle": "&1Chọn Cường hóa",
"levelSelectTitle": "&1Chọn cấp Cường hóa",
"disenchantGUITitle": "&8Gỡ cường hóa",
"autoOpenEnchantingTable": true,
"enchantedBooksEnabled": true,
"enchantedBookCostMultiplier": 1.0,
"successSound": "ENTITY_PLAYER_LEVELUP",
"failSound": "ENTITY_VILLAGER_NO",
"gambleTickSound": "BLOCK_NOTE_BLOCK_HAT",
"gambleWinSound": "ENTITY_FIREWORK_ROCKET_TWINKLE",
"gambleLoseSound": "ENTITY_VILLAGER_DEATH",
"gambleDoubleSound": "UI_TOAST_CHALLENGE_COMPLETE",
"gambleChanceToWinPercent": 50,
"gambleChanceForSecondEnchantPercent": 20,
"messages": {
"prefix": "&8[&dCường hóa&8] &r",
"no_permission": "&cBạn không có quyền sử dụng lệnh này.",
"no_enchant_permission": "&cBạn không có quyền mua cường hóa này.",
"no_item_in_hand": "&cBạn phải cầm một vật phẩm!",
"item_not_enchantable": "&cVật phẩm trên tay bạn không thể cường hóa.",
"books_disabled": "&cTạo sách cường hóa hiện đang bị tắt.",
"not_enough_money": "&cBạn không đủ tiền! Cần &e{cost}&c.",
"enchant_success": "&aĐã cường hóa vật phẩm với &e{enchant} {level} &avới giá &e{cost}&a!",
"config_reloaded": "&aĐã tải lại cấu hình thành công!",
"disenchant_success": "&aĐã gỡ &e{enchant} {level} &avà hoàn lại &e{refund}&a!",
"item_not_disenchantable": "&cVật phẩm trên tay bạn không có cường hóa nào để gỡ.",
"gamble_no_enchants": "&cVật phẩm bạn đang cầm cần có ít nhất một cường hóa để cược!",
"gamble_no_available_enchants": "&cVật phẩm này không thể nhận thêm cường hóa ngẫu nhiên.",
"gamble_win": "&aTHẮNG! &fVật phẩm của bạn đã nhận &e{enchant} {level}&f!",
"gamble_win_extra": "&6TRÚNG LỚN! &fBạn nhận thêm cường hóa ngẫu nhiên: &e{enchant} {level}&f!",
"gamble_lose": "&cTHUA! &fTất cả cường hóa trên vật phẩm đã bị &cxóa&f!"
},
"perEnchantPermissions": false,
"enchantmentBlacklist": [
"minecraft:binding_curse"
],
"maxLevelOverrides": {},
"disenchantRefundPercentage": 50.0
}
Cost Formula
costFormula supports:
base_cost: the configured base cost for the selected enchantmentlevel: the selected enchantment level
Example:
"costFormula": "base_cost * (level * level)"
If minecraft:sharpness has a base cost of 1000, level 3 costs 9000.
Enchanted book prices use:
normal_cost * enchantedBookCostMultiplier

