Tutorial: Setting Up a Blueprint Economy with Vault (/cb buy & /cb sell)
CraftingBlueprints integrates directly with Vault and any compatible economy provider (such as EssentialsX Economy or TheEconomy), enabling players to purchase recipes using /cb buy and sell physical blueprints back to the server using /cb sell.
Prerequisites
Ensure the following plugins are loaded on your server:
- CraftingBlueprints
- Vault
- Any Vault-compatible economy plugin (e.g. EssentialsX)
Verify that Vault is active by checking /cb status in console.
Step 1: Configure Reusable Economy Templates
To maintain balanced pricing across your server, declare reusable economy templates in plugins/CraftingBlueprints/blueprints/00_economy_tiers.yml:
# yaml-language-server: $schema=./blueprint.schema.json
templates:
# Tier 1: Novice Equipment
economy_apprentice:
price: 1500.0
sell_price: 375.0
extra:
tier: "APPRENTICE"
# Tier 2: Expert Gear
economy_journeyman:
price: 7500.0
sell_price: 1875.0
extra:
tier: "JOURNEYMAN"
# Tier 3: Endgame Master Artifacts
economy_master:
price: 35000.0
sell_price: 8750.0
extra:
tier: "MASTER"
Step 2: Configure Blueprint Recipes with Economy Tags
Create blueprint definitions referencing your economy tiers (e.g., plugins/CraftingBlueprints/blueprints/industrial_tools.yml):
# yaml-language-server: $schema=./blueprint.schema.json
singles:
diamond_drill_blueprint:
blueprint: DIAMOND_PICKAXE
name: "<gradient:#00AAFF:#00FFAA><bold>Industrial Diamond Drill Blueprint</bold></gradient>"
permanent: true
# Inherit Master tier pricing ($35,000 buy / $8,750 sell)
templates:
- economy_master
item:
material: FILLED_MAP
glowing: true
map:
theme: technical_slate
frame: bracket
badge: crafting
lore:
- "<dark_gray><strikethrough>-----------------------------</strikethrough></dark_gray>"
- "<gray>Target Equipment:</gray> <white>{target_item}</white>"
- "<gray>Tier Classification:</gray> <gold><bold>{tier}</bold></gold>"
- "<dark_gray><strikethrough>-----------------------------</strikethrough></dark_gray>"
- "<yellow>Purchase Price:</yellow> <green>${price}</green>"
- "<yellow>Sell Refund Value:</yellow> <gold>${sell_price}</gold>"
- "<dark_gray><strikethrough>-----------------------------</strikethrough></dark_gray>"
- "<dark_gray>Run /cb buy diamond_drill_blueprint to purchase.</dark_gray>"
Hot-reload your blueprint definitions without restarting:
Step 3: Player Permissions Setup
By default, purchasing and selling permissions are granted to all players:
craftingblueprints.buy(Default:true)craftingblueprints.sell(Default:true)
If you manage permissions via LuckPerms, you can explicitly configure them:
# Allow all default players to buy and sell blueprints
lp group default permission set craftingblueprints.buy true
lp group default permission set craftingblueprints.sell true
Step 4: Purchasing Blueprints In-Game (/cb buy)
Players purchase blueprints through chat commands, supporting two distribution modes:
Mode A: Direct Virtual Unlock (Default)
When a player runs:
- The plugin verifies that Vault has an active economy provider and checks the player's balance.
- If the player has at least
$35,000, Vault deducts the cost. - The recipe is unlocked directly in the player's profile:
- The player can immediately craft the Diamond Pickaxe at any crafting table.
- A level-up sound plays (
ENTITY_PLAYER_LEVELUP). - The recipe is now visible in the player's
/cb menudashboard.
- If the player has insufficient funds, a localized error message displays the missing balance.
Mode B: Physical Item Grant (--item)
If a player wants a physical, tradeable blueprint item (for example, to store in a chest, trade with friends, or frame in their base):
- Vault deducts
$35,000from the player's balance. - The plugin delivers the physical blueprint item (e.g., high-resolution map or parchment) directly into the player's inventory.
- Inventory Overflow Safety: If the player's inventory is full, the item safely drops at their feet instead of being lost.
Step 5: Selling Physical Blueprints Back (/cb sell)
If a player has a physical blueprint in their inventory with a configured sell_price::
- The player holds the physical blueprint item in their main hand.
- The player executes:
- The plugin:
- Inspects the item's persistent data tag to verify its authenticity.
- Reads the blueprint's
sell_price($8,750). - Removes 1 blueprint item from the player's main hand.
- Executes
economy.depositPlayer(player, 8750.0). - Plays an orb pickup sound and confirms the transaction in chat.
Step 6: Creating Custom GUI Shops with DeluxeMenus
If you want a custom graphical shop interface for your server, you can integrate CraftingBlueprints commands with any menu plugin (e.g., DeluxeMenus, TrMenu, or ChestCommands):
# DeluxeMenus Example Button (Diamond Drill Blueprint)
items:
'drill_blueprint':
material: FILLED_MAP
slot: 13
display_name: '�AAFF&lIndustrial Diamond Drill Blueprint'
lore:
- '&7Price: &a$35,000'
- '&7Click to purchase!'
left_click_commands:
- '[player] cb buy diamond_drill_blueprint'
right_click_commands:
- '[player] cb buy diamond_drill_blueprint --item'
This architecture gives you complete visual freedom over your shop menus while CraftingBlueprints guarantees atomic transactions and anti-duplication protection behind the scenes.