How to Make a Sell Wand
A sell wand is an item that sells the contents of a container at shop prices when a player right-clicks it. A wand defines its item, its limits, which items it sells, and a left-click inspect preview. This page covers making one from scratch.
Quick start
Open the
/sellwands/folder inside the EcoShop plugin folder.Copy
_example.ymland rename it to your wand's ID, e.g.golden.yml.Set the
name,item, andlorefor the wand.Set
uses,cooldown, andmultiplier.Run
/ecoshop reload, then/ecoshop givewand <player> goldento hand the wand out.Put some sellable items in a chest and right-click it with the wand to confirm they sell.
Naming and IDs
The file name without .yml is the wand's ID. This is what /ecoshop givewand references. Every wand is also a custom item with the ID ecoshop:sellwand_<id>, so you can sell it in a shop, use it in recipes, or give it with effects. The item uses the Item Lookup System format, so you can use vanilla items, custom items, and modifiers.
The structure of a sell wand
| Part | What it controls |
|---|---|
| Item | The wand item, its name, and its lore |
| Limits | Uses, cooldown, period limit, and per-use caps |
| Containers | Which blocks the wand works on, and whether it needs sneaking |
| Filters | Which items the wand sells, and extra multipliers |
| Bypass | Shop checks the wand skips |
| Conditions | Conditions the player must meet to use the wand |
| Inspect | The left-click sale preview |
# === Item: the wand item ===
name: "&6Golden Sell Wand" # The display name used in messages.
item: blaze_rod glint name:"&6Golden Sell Wand" # The wand item.
lore: # Lore applied to the wand.
- "&7Right-click a container to sell its contents."
- "&7Left-click to preview."
- "&7Uses left: &e%uses%"
- "&7Multiplier: &a%multiplier%x"
- "&7Sold: &a%sold_items%&7 items for &a%sold_value%"
# === Limits: how often and how much the wand sells ===
uses: 100 # Uses before the wand is empty, -1 for infinite.
cooldown: 5 # Seconds between uses, 0 for none.
period-limit:
uses: 20 # Max uses per period, -1 for none.
period: 1440 # Period length in minutes.
max-items-per-use: 1728 # Max items sold per use, -1 for none.
max-value-per-use: 50000 # Max money earned per use, -1 for none.
multiplier: 1.5 # Sell price multiplier.
break-when-empty: true # If the wand is removed when it runs out of uses.
# === Containers: where the wand works ===
containers: # Container blocks the wand works on.
- chest
- trapped_chest
- barrel
- shulker_box
require-sneak: false # If the player must sneak to use the wand.
# === Filters: what the wand sells ===
filters:
shops: [ ] # Only sell items from these shops, empty for all shops.
whitelist: [ ] # Only sell these items, empty for all items.
blacklist: [ ] # Never sell these items.
multipliers: # Extra multipliers for specific items.
- rule: "category:minerals"
multiplier: 2.0
- rule: "cobblestone"
multiplier: 0.5
# === Bypass: shop checks the wand skips ===
bypass:
dynamic-pricing: false # Pay the base price and don't move the dynamic price.
player-limits: false # Ignore sell.limit.
global-limits: false # Ignore sell.global-limit.
# === Conditions: who can use the wand ===
conditions: [ ] # Conditions the player must meet to use the wand.
# === Inspect: the left-click preview ===
inspect:
enabled: true # If left-clicking a container previews the sale.
display: message # message, hologram, or both.
duration: 60 # Ticks the hologram stays.
height: 1.5 # Blocks above the container the hologram shows.
lines: # The hologram lines.
- "&fSells &a%amount%&f items"
- "&ffor &a%price%"
- "&7%unsold% stacks can't be sold"
Item
The wand item players hold, with its name and lore. The lore is updated after every use, so it can show the wand's remaining uses and lifetime stats.
name: "&6Golden Sell Wand" # The display name used in messages.
item: blaze_rod glint name:"&6Golden Sell Wand" # The wand item.
lore: # Lore applied to the wand.
- "&7Right-click a container to sell its contents."
- "&7Uses left: &e%uses%"
- "&7Sold: &a%sold_items%&7 items for &a%sold_value%"
Limits
How often a wand can be used, and how much it sells each time.
uses: 100 # Uses before the wand is empty, -1 for infinite.
cooldown: 5 # Seconds between uses, 0 for none.
period-limit:
uses: 20 # Max uses per period, -1 for none.
period: 1440 # Period length in minutes.
max-items-per-use: 1728 # Max items sold per use, -1 for none.
max-value-per-use: 50000 # Max money earned per use, -1 for none.
multiplier: 1.5 # Sell price multiplier.
break-when-empty: true # If the wand is removed when it runs out of uses.
A use is only spent when something sells, so right-clicking an empty chest costs nothing. When a wand runs out of uses it's removed, or if break-when-empty is false, it stays and stops working. The period-limit window starts on the first use and resets once period minutes have passed. max-value-per-use only counts items sold for money (eco:economy prices).
The multiplier stacks with everything else, so an item's final price is:
base price × dynamic pricing × boosters × wand multiplier × filter multiplier
Containers
Which blocks the wand works on. Right-clicking any other block behaves normally.
containers: # Container blocks the wand works on.
- chest
- trapped_chest
- barrel
- shulker_box
require-sneak: false # If the player must sneak to use the wand.
shulker_box matches every colour of shulker box, and a double chest sells both halves. Wands respect claim and protection plugins, so a player can't sell from a container they aren't allowed to open. Set require-sneak: true if players should still be able to open containers with a wand in hand.
Filters
Which items the wand sells, and extra multipliers for specific ones. A rule is either a shop item ID, e.g. diamond, or a category, e.g. category:minerals.
filters:
shops: [ ] # Only sell items from these shops, empty for all shops.
whitelist: [ ] # Only sell these items, empty for all items.
blacklist: [ ] # Never sell these items.
multipliers: # Extra multipliers for specific items.
- rule: "category:minerals"
multiplier: 2.0
- rule: "cobblestone"
multiplier: 0.5
An item has to be in one of the shops and pass the whitelist to sell, and the blacklist wins over both. If more than one multiplier rule matches an item, a shop item rule wins over a category rule.
Bypass
Shop checks the wand skips. A bypassed check is ignored, and sales from the wand don't count towards it.
bypass:
dynamic-pricing: false # Pay the base price and don't move the dynamic price.
player-limits: false # Ignore sell.limit.
global-limits: false # Ignore sell.global-limit.
Conditions
Conditions the player must meet to use the wand, checked on every use.
conditions:
- id: has_permission
args:
permission: group.vip
Inspect
Left-clicking a container with the wand previews the sale without selling anything, so no uses or cooldown are spent.
inspect:
enabled: true # If left-clicking a container previews the sale.
display: message # message, hologram, or both.
duration: 60 # Ticks the hologram stays.
height: 1.5 # Blocks above the container the hologram shows.
lines: # The hologram lines.
- "&fSells &a%amount%&f items"
- "&ffor &a%price%"
- "&7%unsold% stacks can't be sold"
message sends the sellwand.inspect message from lang.yml, and hologram shows lines above the container, visible only to that player. The previewed price doesn't include boosters, since those are only applied when the sale happens.
Internal placeholders
These placeholders are available in the wand's lore:
| Placeholder | Value |
|---|---|
%uses% | The wand's remaining uses, or ∞ if infinite |
%max_uses% | The wand type's uses, or ∞ if infinite |
%multiplier% | The wand's multiplier |
%sold_items% | The number of items this wand has sold |
%sold_value% | The value this wand has sold, shown with each price's display, e.g. $1,500 and 6 Crystals |
These placeholders are available in inspect.lines:
| Placeholder | Value |
|---|---|
%amount% | The number of items that would sell |
%price% | The value those items would sell for |
%unsold% | The number of stacks that can't be sold |
Where to go next
Items: make items sellable for wands in How to Make an Item.
Commands: give wands with Commands and Permissions.
Sell chests: sell containers automatically with How to Make a Sell Chest.
Defaults: the shipped sell wands live here.