I'm trying to make a "Villager Custom Shop Trade Thing-y". This Villager is going to sell a Heavy weighted pressure plate. When I have the item in my hotbar, I want the Item to disappear from my hotbar and immediately come back a Data tag.
Command Blocks:
Repeat - /scoreboard players set @a Pressure_Plate 0
Chain - /scoreboard players set @a Pressure_Plate 1 {SelectedItem:{id:"minecraft:heavy_weighted_pressure_plate"}
Chain - /execute @a[score_Pressure_Plate_min=1] ~ ~ ~ /give @p minecraft:heavy_weighted_pressure_plate 1 0 {CanPlaceOn:["minecraft:gold_block"]}
I added a scoreboard command after I put these commands on top:
/scoreboard objectives add Pressure_Plate dummy
So what I'm trying to detect the item in my hand, but I can't make it work. It says, "Unbalanced Brackets". I'm tried to fix it by I can't. Can you help me guys?