Actually after logging onto minecraft and checking, there is a even better way of removing the items that have 0 losses. **/clear @p[hasitem={item=gold_ingot,quantity=5},r=5]gold_ingot 1 5** What this does is clears 5 gold from the closest player THAT HAS 5 gold. NOT the actual closest player. Obviously this system can be abused to force others to buy the items and waste 5 gold but thats why the **r=5** is there (this number can be increased or decreased). Instead of abusing it cross map, it clears gold from the closest player within a 5 block radius RELATIVE to the COMMAND BLOCK (CHANGING the place its relative from can be done with **/execute**). This is NOT a PERFECT system but at least its better then clearing from the closest player and wasting their resources.
@SubtotalCamp8752 жыл бұрын
Ty for the heart and pin good sir (:
@legendcraftb_2 жыл бұрын
Wow didn’t know about this… a solution to many comments!
@Thaqif.2 Жыл бұрын
Why he said no matched target selector?
@amirs9113 Жыл бұрын
@X Chase it's doesn't work
@tapfever7102 Жыл бұрын
This only works if you have EXACTLY 5 gold, no more and no less, but other than that, it’s great!
@Ooahah272 жыл бұрын
If you guys don’t know how to get a NPC heres the command: */give @p spawn_egg 1 51* Enjoy your NPC and @Legend’s tutorial is very useful, thanks @Legend!
@Mizam7982 жыл бұрын
So that is how you get
@superxgaming84032 жыл бұрын
Or /summon Minecraft:npc
@hungeriscrazy2 жыл бұрын
Do u need any mod for it??
@Sapphire990 Жыл бұрын
@@hungeriscrazy nope
@Noodlesoup07 ай бұрын
The way to get an npc spawn egg has changed, used to you could do this but now you have to do /summon npc, then have a key bind set to “pick block” then click on the npc with that button.
@benjaminamerson23762 жыл бұрын
i did a little testing, and i you want to short with space and not have so many chain command blocks in a row, first place a command block just like he does and add the command, but when you place the chain command block do the exact code he does but instead of one you can put one number lower then you need. for instance, shears for 20 iron so do the chain command block as /clear @p iron_ingot 0 19 and then place another command block and type /clear @p iron_ingot 01 and then add another block with the shears. you can save 20 blocks of space. but thank you Legendcraft for the amazing video!! liked and subscribed :)
@bahaaghemrawi79892 жыл бұрын
thx
@bahaaghemrawi79892 жыл бұрын
my price is 128 diamonds for car (addon)
@Noodlesoup07 ай бұрын
This should be the pinned comment tbh
@Tray993 жыл бұрын
Thank you so much I started my own server with this 😊
@hrua23752 жыл бұрын
can i get ip pls?
@_Angelixcvte_2 жыл бұрын
How many people joined? And also can I get it plz?
@antsamerica79232 жыл бұрын
Hey I did the same thing
@kingoreo53852 жыл бұрын
ip?
@amansardjoe3088 Жыл бұрын
You know there is a easyer way to do this
@ibestowgreatness2 жыл бұрын
Thank you man, this was the only actual working tutorial. You earned a new sub :D
@dv8games68 Жыл бұрын
Well I know that this comment won’t get many views but instead of making 5 command blocks for 5 gold you can make 2 one clearing 4 gold and the other one clearing 1.
@Kenneth18207 ай бұрын
W Comment
@Atlas-loves-gaming5 ай бұрын
Or you could just do one that take away 5 right?
@flyingdoggo3164 ай бұрын
@@Atlas-loves-gamingI’m wondering the same. I haven’t started building but in case there’s an answer I’ll be here
@thejeemsmemes4 ай бұрын
@@Atlas-loves-gaming yea that also works
@ibrahimali31923 ай бұрын
@@Atlas-loves-gaming then it will work even if you have 1 of the thing.
@batz75172 жыл бұрын
One question how do you make it so the command doesn’t work if you don’t have enough gold or diamonds
@Jayway2472 жыл бұрын
it automaticaly dosnt let you buy it if it dosnt go through all the way but it does still take your items
@nomish82 жыл бұрын
@@Jayway247 "The NPC stole some of your diamonds!"
@rafraf96012 жыл бұрын
Very good tutorial (which is onto date) just to remind everyone when they do this if you use this if you click the button it will actually show what the command did in chat, the way to fix this is do /gamerule sendcommandfeedback false
@MrKatiekatt662 ай бұрын
I'm good at commands in Minecraft
@Loxixx_2 жыл бұрын
Thanks I been trying this for so long, you deserve 10k subs
@PuggyBoi2 жыл бұрын
I searched a while to find what i was looking for. Needed this for upcoming additions to a survival server of mine. It works well! There is just one problem. If you dont have the right amount of an item to buy another item, say 3 gold and theres 5 bread for 5, if you try to buy the bread, it will take the gold away and the chain ends. Basically scamming the player of gold in exchange for nothing. Wether this can be fixed im not sure. But the commands work and the probability someone will not bring the right amount of gold is very low!
@Felipe0752 жыл бұрын
I can fix it but it's a big system
@mickylmao2 жыл бұрын
I dealt with that too I don’t understand why
@Lyyyygyyyyfyyyy2 жыл бұрын
I guess you could make a another command block bellow it that gets activated when it stops so if you have one gold for something like a 3 gold chest plate it will take away the one gold but then it will activate the other command block giving you one gold back
@BughaFromFortnitePro Жыл бұрын
Thanks so much you don’t know how much I needed this. Sub deserved👌
@mobilegameman88242 жыл бұрын
Your a legend! That’s so simple! (I subbed🤗)
@amirs9113 Жыл бұрын
You're really a genius, thank you so much !!!
@nyonplayz41103 жыл бұрын
ur voice went from: ALO GUYS WELCOME TO MY MINECRAP LET PLAY to: sup bois
@thecelestialmonarch70362 жыл бұрын
i see small problem with this set up, If you try to buy something without enough gold the command just gets rid of it,. I think it is possible to make it not get rid of the gold and maybe a set-up saying not enough gold. Although it may be more complicated i still think it would have a more desired effect
@legendcraftb_2 жыл бұрын
You're probably right, I just tried to keep it simple.
@hazoomiezombie2 жыл бұрын
@@legendcraftb_ well...how do we do that
@ElijahGamin2 жыл бұрын
Very, very helpful! Thank you so much, was having trouble figuring out how to do this.
@MrMan-bz4kx2 жыл бұрын
I'm working on my own PVP game and this is so helpful! So underrated, keep it up!
@legendcraftb_2 жыл бұрын
Glad to hear it helped!
@qaisiman15452 жыл бұрын
Hey thank you for the tutorial I will make my own bedwars in Minecraft
@GemGirl20092 жыл бұрын
This was awesome! Tysm for this tutorial! I want to learn more about coding and creating things in Minecraft (and I was just bored lol). This was an amazing tutorial. Tysm! From one content creator to another, keep up the amazing work! :D
@rawr61332 жыл бұрын
Thank you so much I thought I would be up all night looking for how to do this. Thank you
@RealJOof2 жыл бұрын
OMG THNAK YOU!!! For me everything still works, everything is perfect besides the take away items, other then that thank you.
@triver99103 жыл бұрын
Now I can play bedwars and eggwars with my friends in my own world, thank you!
@FerretmandoVR2 жыл бұрын
Does it only work in bedrock edition?
@r1cknasty5672 жыл бұрын
@@FerretmandoVR yeah
@Frazcaideadlol__2 жыл бұрын
THANK YOU I'VE BEEN SEARCHING FOR HOURS
@XXXTENTACIONlove-lv5pk9 ай бұрын
Your the best man keep going ❤
@thejeemsmemes4 ай бұрын
Yo this is great thanks man
@jaaz19203 жыл бұрын
Damn you really are a legend thank you! Also is there a way to cancel the purchase if you dont have enough diamonds and make it give the diamonds you had back?
@thatguymaty Жыл бұрын
The thing is that if you don’t have enough gold instead of not just getting the iron sword the entire system will take away from you gold without giving you the trade .
@LaCaca617 ай бұрын
use clear @p[hasitem={item=gold,quantity=5..(price of your item)}] gold 1 5 The two dots after your price are important and this command will only remove your gold if you have atleast 5 gold
@NothingToReadAndWatchHere Жыл бұрын
The problem is when you buy a Diamond sword, (it's cost 5 Gold ingot) and you only have 4 gold and you buy it's, just clear your gold ingot because the command block is clearing 1 gold ingot 5 times and because you have 4 gold ingot you can continue the command block chains.
@someguynamedjack83112 жыл бұрын
Thank you I’m so glad someone made one that you can’t just steal from you are so amazing
@mrkingbeastmediakenth20092 жыл бұрын
Before you do this if you gonna put the command block away type tickingarea ~ ~ ~
@UsamaTechTips2 жыл бұрын
I did it but it was only working on the only one command block like I've 2 command blocks, one for iron and one for gold. I put the ticking area but was working only for the iron one gold one wasn't working.
@mrkingbeastmediakenth20092 жыл бұрын
@@UsamaTechTips do instead tickingarea add circle or how wide the command block sets
@UsamaTechTips2 жыл бұрын
@@mrkingbeastmediakenth2009 Tysm dude
@Mt.Lhotse2 жыл бұрын
A helpful tip to save time, make one command block that says /clear 0 4 the Another that says /clear 0 1
@r1cknasty5672 жыл бұрын
thanks
@Thatoneguyblud2 жыл бұрын
Thanks! You just helped me make my own smp for me and my friends
@koureinramos733 Жыл бұрын
Wow this is so helpful for beginners for coding
@ArchieDaCookieMinion2 ай бұрын
WHAT A LEGEND THIS MAN IS
@xM02Ax Жыл бұрын
If you buy the item on the npc, will other player get the item that you just bought?
@SupImCamm2 жыл бұрын
I subbed because this wasn’t a fake and trash video it was good your are a swag boss
@sammyblaze38812 жыл бұрын
Thanks sooo much this helped out alot!
@NightOpsBravo3 ай бұрын
Is there a way to get your gold back if you accidentally press a button but don't have enough?
@wodan73382 жыл бұрын
I was making my own custom bedwars for me and my friends but i couldnt figure out any trading system so i resorted to buttons and signs.
@wodan73382 жыл бұрын
This video is going to change that
@af-ds8jr2 жыл бұрын
u legend ty sooooo much this was so helpful
@Not_Ginston2 жыл бұрын
@Legend can you make command block tutorial about team deathmatch(tdm) system?,i really need it and cab you make it multiplayer friendly?
@Literally_stone2 жыл бұрын
Thank you so much! this helped me a lot you are a real legend.
@somerandom85003 жыл бұрын
Even if you have 1 gold ingot or 0 it'll give the weapon anyway
@ItzZeidAiden._.2 жыл бұрын
Omg it work thank you so much for tutorial
@andreabuitragoantonelli55052 жыл бұрын
most helpful video thank you!
@iciika1697 Жыл бұрын
Does this work on multiplayer?
@nin73573 жыл бұрын
Thank you man I appreciate this
@ayeshafatima83032 жыл бұрын
Thank you legendcraft i say you are legend
@unlucky87152 жыл бұрын
I need to add enchantments to the stuff I am getting from the npc how do I add it on the command block chain?
@Dxrty.2 жыл бұрын
tysm i found another one of these vids and the problem was if u have 1 of that item it would still buy it tysm now i can fix it
@legendcraftb_2 жыл бұрын
You are the one person out of all the comments on this video that actually understands that lol
@wilsonstan2 жыл бұрын
Tysm this helped so much
@AyoWhat8163 жыл бұрын
Does it work if I add an texture packs or Add more items to trade , I subbed
@legendcraftb_3 жыл бұрын
Yes and yes
@Abhinvv4583 жыл бұрын
But u have to put the id also
@Abhinvv4583 жыл бұрын
For example spyderrocks mod pack have sp:
@Abhinvv4583 жыл бұрын
Like normal is minecraft:diamond_block
@Raven8542 жыл бұрын
This was actually soo easy thank u soo much
@sjthegoat_3 жыл бұрын
TK Man im gonna make a bedwars game myself too so thank u
@gur-aryah1192 жыл бұрын
you are a legend thank you for building this it was useful for one v one bed wars
@marlowelinn69058 ай бұрын
Can anybody help me? I have tried multiple different methods. Nothing works. The buttons on the npc appears but when I click the button it just exits me out the npc chat and doesn’t take my item for another item😭
@bacon18283 жыл бұрын
How do I like if me price my shop the sheild cost 10 diamonds means I got to put 10 more command block ?
@allonsyalonzo3 жыл бұрын
Your last vid and the one before that about bedwarz the gold wouldn't spawn on the gold block? It just was shot out of the dropper and you had to collect it there ?!
@FortniteZachologgy3 жыл бұрын
POV : his voice changed BUT OPPPP AND THX
@pandaplayz3953 жыл бұрын
Can we make so we don't lose gold if we don't have enough gold?
@IsraelVlevine3 жыл бұрын
Well before you get it you can clearly see the prices so if someone wants to see if they can cheat but then lose there gold it should be there fault
@legendcraftb_3 жыл бұрын
Sorry, bedrock doesn't really have the capabilities :( I know, its quite annoying
@youssefabdul-hussain38432 жыл бұрын
I am about to try this but what is someone has 10 diamonds that they worked hard for and they were one diamond away from getting an item. Does it mean they lose all their diamond and get nothing?
@r1cknasty5672 жыл бұрын
yeah
@bahaaghemrawi7989 Жыл бұрын
wait isnt @p to closest player. So if anyone is closer to the command block, he will get the reward. Right?
@mysticlone987562 жыл бұрын
I can't get the NPC to spawn with a spawn egg, and if I try it with a command the NPC spawns, but doesn't do anything. Just a comment box
@shiyouadachi27832 жыл бұрын
I had a problem with the items. When for example, you will trade 5 gold nuggets to a cooked beef, the system will still give you the cooked beef even if you have no nuggets. The tutorial is perfect but i was shocked when i tried it. I'm using MCPE 1.18.2 version. i hope this'll get notice
@legendcraftb_2 жыл бұрын
If you have 3, it should start taking them away, but if you do not have enough, the chain should stop. Make sure all of the command blocks are set to conditional. Let me know if that helps!
@shiyouadachi27832 жыл бұрын
@@legendcraftb_ Yes that works. My problem was even without the gold nuggets, the system still gives you the product even if you don’t have or if you lack quantity of the product you will exchange. But system does take away the nuggets.
@nierinwolfy85132 жыл бұрын
I have the same problem
@Espartanssj3 жыл бұрын
I loved this tutorial I will use it then my maps thanks
@UsamaTechTips2 жыл бұрын
Hey bro I'm a fellow subscriber. I'm making the setup far away from the NPC and apparently, it's not working could you tell me a solution would be a pleasure. By the way, love the video, and keep going.
@wodan73382 жыл бұрын
Go into every command block except for the first one, then type in “/execute @e[type=npc,c=1,name=(name of npc)] ~ ~ ~” at the beginning of the command
@wodan73382 жыл бұрын
Also there must be someone close enough to the command blocks or else the wont activate
@thejeemsmemes4 ай бұрын
Wait cant you just use one command block to clear all items at once?
@Mr.YeyemanG2 жыл бұрын
You are a legend thank youn
@childish_box2 жыл бұрын
The redstone block won't place for me and it won't disappear it's kinda sad :(
@AlvinEliaslLashley3 ай бұрын
Bro thank u so much bro I gonna repay you back for this
@InsertTheNameHere1 Жыл бұрын
Great earned a sun THX
@real4kGaming3 жыл бұрын
This is good but if you buy something and you don't have enough it still takes your gold
@gl1tche2 жыл бұрын
What
@JayJay-pc8we2 жыл бұрын
Thx bro you are the best
@legendcraftb_2 жыл бұрын
No problem! Glad it helped!
@1qw3rt3 жыл бұрын
Hello! I'm new to your channel! Thanks for the tuturials!(commands,island and the custom villager trades) I want to help with subing. Enjoy your sub :D
@legendcraftb_3 жыл бұрын
Thanks!
@bahaaghemrawi79892 жыл бұрын
but if a player is standing like near the command block then it will give him a diamond sword.
@worthingtonmeyers85612 жыл бұрын
Can't we just put in the chain blocks how many we want taken like in the 1st chain we say "/clear @p diamond 4" in the 1st block instead of drawing it out so it will only be 3 blocks in the line. 1 for redstone, 1 for taking away diamonds, and 1 for giving the item that was bought
@Eman-ec6fb3 жыл бұрын
eh legend u may not remember me my old name was pex i just want to congratulate you for coming so far from 100 subs
@legendcraftb_3 жыл бұрын
Thanks dude it means a lot :D
@Eman-ec6fb3 жыл бұрын
@@legendcraftb_ Welcome :D
@kelliecook40002 жыл бұрын
I'm making a map and I don't know how to sell enchanted stuff can u help me with that
@captaingrizzly43372 жыл бұрын
I always try to make my own pvp game with mods looks like I don’t really need to now
@expoit90593 жыл бұрын
How would I make it give a enchanted sword or item instead of a normal one?
@michaelsminecraftknowledge2 жыл бұрын
Use /structure to load a enchanted sword
@izeiqgaming4042 жыл бұрын
It doesnt take the diamonds? What do ido
@glamscare55632 жыл бұрын
how do you make it that when yiu buy something the menu doesnt disappear
@SubtotalCamp8752 жыл бұрын
That is not possible in vanilla due to Minecraft mechanics
@Solarb3amtheseventh3 жыл бұрын
Watched your video from last year,you grew up lol
@Dark-lo2kf3 жыл бұрын
How to always show their names??? Cause mine is only when you point them
@cuppaonathrone3 ай бұрын
The thing is, you lose resources, why don’t you make it clear all the resources at once and the next command block is conditional then you wouldn’t be able to buy something you can’t afford and you won’t lose anything, and if you want you can make it say you can’t afford
@bludunknownunknown3282 жыл бұрын
1:54 i really though your gonna make a sus structure
@kbswastik3 жыл бұрын
Noice
@noahmccartney86152 жыл бұрын
If you have less you will lose all of that item is there a way to fix that?
@legendcraftb_2 жыл бұрын
Sadly this is the best system for bedrock edition
@SubtotalCamp8752 жыл бұрын
@@legendcraftb_ Actually after logging onto minecraft and checking, there is a even better way of removing the items that have 0 losses. **/clear @p[hasitem={item=gold_ingot,quantity=5},r=5]gold_ingot 1 5** What this does is clears 5 gold from the closest player THAT HAS 5 gold. NOT the actual closest player. Obviously this system can be abused to force others to buy the items and waste 5 gold but thats why the **r=5** is there (this number can be increased or decreased). Instead of abusing it cross map, it clears gold from the closest player within a 5 block radius RELATIVE to the COMMAND BLOCK (CHANGING the place its relative from can be done with **/execute**). This is NOT a PERFECT system but at least its better then clearing from the closest player and wasting their resources.
@BradMad2 жыл бұрын
How do you make the villigerblike that?
@manojjagtap60043 жыл бұрын
But will the middle 3 chain command blocks be conditional
@AthenaJeanne2 жыл бұрын
Yep! They will.
@FerretmandoVR2 жыл бұрын
I dont know I tried every step but I doesn't work it either is because I'm not on minecraft bedrock or I did something wrong I am on mobile and on minecraft not Java not bedrock only minecraft
@Bordzt2 жыл бұрын
Hey! Just wanted to tell that there’s an easier way. Instead of doing 1 of each chain command blocks for each gold that us replaced with (Example: Wool) you can just do a chain command block with: */clear @p 0 (Amount of ore taken away)*
@SubtotalCamp8752 жыл бұрын
And instead of doing @p (relative to the command block) you can use **/execute “[shop name]” ~~~ give @p……..”** that way its a bit more accurate to the player its giving the items to
@SubtotalCamp8752 жыл бұрын
Actually after logging onto minecraft and checking, there is a even better way of removing the items that have 0 losses. **/clear @p[hasitem={item=gold_ingot,quantity=5},r=5]gold_ingot 1 5** What this does is clears 5 gold from the closest player THAT HAS 5 gold. NOT the actual closest player. Obviously this system can be abused to force others to buy the items and waste 5 gold but thats why the **r=5** is there (this number can be increased or decreased). Instead of abusing it cross map, it clears gold from the closest player within a 5 block radius RELATIVE to the COMMAND BLOCK (CHANGING the place its relative from can be done with **/execute**). This is NOT a PERFECT system but at least its better then clearing from the closest player and wasting their resources.
@Bordzt2 жыл бұрын
@@SubtotalCamp875 true
@Bordzt2 жыл бұрын
@@SubtotalCamp875 thx
@cheez_crazy2 жыл бұрын
There a problem his commands will still give you the tool even when you don’t pay
@wpotatoz2058 Жыл бұрын
does it work on multiplayer?
@legendcraftb_2 жыл бұрын
Subscribe if this was helpful!
@foxsamurai35912 жыл бұрын
I had the same idea but your design and my design both randomly get rid of a random amount of iron, gold, ect when I try to execute the shop keepers so it’s the person nearest to the shop keeper gets the item
@ghostmc12622 жыл бұрын
Wait the others chain command block is the same command?
@ghostmc12622 жыл бұрын
Im a new sub
@legendcraftb_2 жыл бұрын
@@ghostmc1262 yep
@ghostmc12622 жыл бұрын
Thank You
@hydro_mc-og Жыл бұрын
how do you get the little nPC people
@respectultimate282 жыл бұрын
thx so much if anyones thinking that first parts complicated wake the frick up
@Fr00tLoops72 жыл бұрын
Thanks !!!
@MafangFento2 жыл бұрын
But why when player dont have enough they buy and lost their emerald
@eliaslundqvist7l1273 жыл бұрын
But how do i get the special villager
@c0mbozz3533 жыл бұрын
In chat you type /summon npc And the npc will spawn where you are standing