How can I let me players buy items with their coins?

I use essentials economy and I'm introducing plushies. How can I make it to where my players can buy plushies for x amount of money?
7 Replies
Admincraft Meta
Thanks for asking your question!
Make sure to provide as much helpful information as possible such as logs/what you tried and what your exact issue is
Make sure to mark solved when issue is solved!!!
/close !close !solved !answered
Requested by ayodaisy#0
spenuch
spenuch2d ago
GUI shop or some kinda shop plugin can run a command, any command you need, to accomplish this. Im sure you’ll figure it out. Alternatively have crates, and sell crate keys for x anount of money
Lunaiskey
Lunaiskey2d ago
you can also use deluxemenus and make a shop with that
AYODAISY
AYODAISYOP18h ago
So I just set up deluxemenus, just unsure how it'll take the money out
Misbah
Misbah15h ago
using a command depends on whatever plugin you're using for economy will need to have some js logic too so if a user has amount > required to purchase something they'll get an error i can send you a example if you want
AYODAISY
AYODAISYOP15h ago
Yes please
Misbah
Misbah15h ago
'buy_commonkey':
material: TRIPWIRE_HOOK
amount: 1
slot: 0
update: true
display_name: '&f&l1x &a&lCommon Key'
enchantments:
- mending;1
hide_enchantments: true
hide_attributes: true
lore:
- '&8Coinshop Item'
- ''
- '&6Price: &f10 Coins'
- ''
- '&e➥ Left-Click to purchase'
click_commands:
- "[console] crate key give %player_name% common 1"
- "[console] coins take %player_name% 10"
- "[message] &e&lCoinshop &8&l→ &7You have bought this item!"
- "[message] &e&lCoinshop &8&l→ &f10 &7Coins has been taken from your account!"
- '[sound] ENTITY_EXPERIENCE_ORB_PICKUP'
click_requirement:
requirements:
coins:
type: javascript
expression: '%coinsengine_balance_raw_coins% >= 10'
deny_commands:
- "[message] &e&lCoinshop &8&l→ &cYou don't have enough coins to purchase this!"
- "[message] &e&lCoinshop &8&l→ &cYou need &f10 &ccoins, but you only have &f%coinsengine_balance_coins%&c!"
'buy_commonkey':
material: TRIPWIRE_HOOK
amount: 1
slot: 0
update: true
display_name: '&f&l1x &a&lCommon Key'
enchantments:
- mending;1
hide_enchantments: true
hide_attributes: true
lore:
- '&8Coinshop Item'
- ''
- '&6Price: &f10 Coins'
- ''
- '&e➥ Left-Click to purchase'
click_commands:
- "[console] crate key give %player_name% common 1"
- "[console] coins take %player_name% 10"
- "[message] &e&lCoinshop &8&l→ &7You have bought this item!"
- "[message] &e&lCoinshop &8&l→ &f10 &7Coins has been taken from your account!"
- '[sound] ENTITY_EXPERIENCE_ORB_PICKUP'
click_requirement:
requirements:
coins:
type: javascript
expression: '%coinsengine_balance_raw_coins% >= 10'
deny_commands:
- "[message] &e&lCoinshop &8&l→ &cYou don't have enough coins to purchase this!"
- "[message] &e&lCoinshop &8&l→ &cYou need &f10 &ccoins, but you only have &f%coinsengine_balance_coins%&c!"
here you go so you'll need to change the placeholders and the commands according to the plugin you're using read through the snippet above and you'll understand how it works if u still need help lmk

Did you find this page helpful?