So I have a sign ore shop, where you can currently buy ores for XP, but I'm having trouble on the selling part. I've been trying to create conditional statements to detect if a player has one of a certain item, and if true, take one of that item, and give a certain amount of XP levels. I hope it's possible to do this on a single sign as that's what I've been trying to do. I've tried it on Minecraft Command Science and it doesn't want to work.
Hey all,
So I have a sign ore shop, where you can currently buy ores for XP, but I'm having trouble on the selling part. I've been trying to create conditional statements to detect if a player has one of a certain item, and if true, take one of that item, and give a certain amount of XP levels. I hope it's possible to do this on a single sign as that's what I've been trying to do. I've tried it on Minecraft Command Science and it doesn't want to work.
Help us Drhubs!
Help is on the way (I think).
Wubbla Lubba Dub Dub!
Sorry I missed this? Are you trying to do this with one item? If so it is very easy.
Clear player item ----> /give player xp (Conditional Chain Command Block)
So you would do an impulse CB that would
/clear @p diamond_sword 0 1
and feed that into a chain command block set to 'always active' and 'conditional' that is
/xp and make it give the player the xp that you want but make sure that it is set to conditional
I would do the exact xp command but I don't have MC open in front of me ><