How to make a shop with buttons or on clicking the sign - Minecraft Command Blocks Guide
#shop #minecraft #sign
Making a shop is a great thing to do for your server. If you use your own command blocks you don't have to bother with plugins and have much more room for modification the way you want it to be.
In this guide you will learn 5 different types of shop signs:
0:00 Intro
0:50 Trade Sell Sign (Button)
3:48 Trade Buy Sign (Button) with item scoreboard check
8:08 Currency Sell Sign (Button)
9:35 Currency Buy Sign (Button)
14:00 Currency Buy Sign (ClickEvent on sign)
Commands used:
SIGN 1:
- clear @p minecraft:pumpkin_pie 1
- give @p minecraft:emerald 1
- setblock 64 67 -161 minecraft:oak_wall_sign[facing=south]{"Text1":'{"text":"[SELL]","color":"dark_blue"}',"Text2":'{"text":"Pumpkin Pie","color":"aqua"}',"Text3":'{"text":"1 : 1","color":"gold"}',"Text4":'{"text":"Emerald","color":"dark_green"}'}
SIGN 2:
- execute as @p store result score @s cEmerald run clear @s minecraft:emerald 0
- clear @p[scores={cEmerald=5..}] minecraft:emerald 5
- give @p minecraft:pumpkin_pie 1
- setblock 65 67 -161 minecraft:oak_wall_sign[facing=south]{"Text1":'{"text":"[BUY]","color":"dark_blue"}',"Text2":'{"text":"Pumpkin Pie","color":"aqua"}',"Text3":'{"text":"1 : 5","color":"gold"}',"Text4":'{"text":"Emerald","color":"dark_green"}'}
SIGN 3:
- clear @p minecraft:pumpkin_pie 1
- scoreboard players add @p currency 3
- setblock 66 67 -161 minecraft:oak_wall_sign[facing=south]{"Text1":'{"text":"[SELL]","color":"dark_blue"}',"Text2":'{"text":"Pumpkin Pie","color":"aqua"}',"Text3":'{"text":"1 : 3","color":"gold"}',"Text4":'{"text":"Currency","color":"white"}'}
SIGN 4 / 5:
- execute if score @p currency ^= marketManager pumpkinPrice run scoreboard players remove @p currency 10 (replace ^ with angled bracket! can't put in description)
- give @p minecraft:pumpkin_pie 1
SIGN 4:
- setblock 67 67 -161 minecraft:oak_wall_sign[facing=south]{"Text1":'{"text":"[BUY]","color":"dark_blue"}',"Text2":'{"text":"Pumpkin Pie","color":"aqua"}',"Text3":'{"text":"1 : 10","color":"gold"}',"Text4":'{"text":"Currency","color":"white"}'}
SIGN 5:
- setblock 68 67 -161 minecraft:oak_wall_sign[facing=south]{"Text1":'{"text":"[BUY]","color":"dark_blue","clickEvent":{"action":"run_command","value":"setblock 69 62 -160 minecraft:redstone_block"}}',"Text2":'{"text":"Pumpkin Pie","color":"aqua"}',"Text3":'{"text":"1 : 10","color":"gold"}',"Text4":'{"text":"Currency","color":"white"}'}
- setblock 69 62 -160 minecraft:air replace
SET pumpkinPrice:
- scoreboard players set marketManager pumpkinPrice 10
Create objectives:
- scoreboard objectives add pumpkinPrice dummy
- scoreboard objectives add currency dummy
- scoreboard objectives add cEmerald dummy
Subscribe! Subscribing is free and helps us grow
Join our discord:
- https://discord.gg/CDtGd7x
Join this channel to get access to perks:
- https://www.youtube.com/channel/UCxnPA3lQx8rBUzEpdIgzOaA/join
Other Videos By Forgotten Games
Other Statistics
Minecraft Statistics For Forgotten Games
Forgotten Games presently has 156,073 views for Minecraft across 40 videos, with His channel uploaded over 1 day worth of Minecraft videos. This makes up 5.16% of the content that Forgotten Games has uploaded to YouTube.