I'm setting up a new server, and would like to have some custom Advancements.

I was thinking of using these as a way to start new players out with some basics...as they go through the spawn room, they would trigger Advancements that would run Functions to give them some items:

  • wooden axe
  • wooden pick
  • wooden sword
  • white bed
  • some food
  • leather armor...

Nothing ground shaking, but should allow for a slightly easier start.

I tried using the Advancements Generator here and using location ranges as the criteria, but they don't seem to be working.

Now I'm trying to use command blocks and pressure plates...but I can't get the correct commands to either grant the Advancement to the player stepping on the pressure plate...or the Function to gift the items to the player stepping on the pressure plate.

I've tried using the @p selector but that isn't working... give @p item amount

Have also tried execute as @s run give @p... but that isn't working either.

Do I have to somehow anchor the command to a location? I would have thought that the command block's location would be used by default...maybe it isn't though,



If I run axe.mcfunction which has give @s wooden_axe 1...it works from chat

However, some of the functions aren't being recognized, and that is obviously the issue...like

give @s leatherhelmet 1 28 {display:{color:1476153,Name:Newb},ench:[{id:0,lvl:1},{id:3,lvl:1},{id:4,lvl:1}]}

...even when run in chat returns an error of Error: Player not found. It only works when I type in the actual username...no variables are working...@s, @p, @a won't work...

Update 2

After playing around some more...

/give @s leatherhelmet 1 28 {display: {Name: "Newb", color: 1476153}}

works with the playername...every time...still doesn't work with the variable.

Update 3

I now have the Advancements being granted correctly...and most of the functions to give items...the only one that isn't working is the one to give colored armor...

I got the command blocks to give the items by using execute as @p run function ... and the functions use give @p item count

  • Does the function work when executed from chat? – Fabian Röling Feb 11 '19 at 16:21
  • Some do...I will update. – Rdster Feb 12 '19 at 11:49
  • That is very weird. There's a syntax error in your leather helmet command, but it's later than the player. Are you sure that you used that exact command? Did you copy it in Minecraft and paste it in here? Please don't re-type it. – Fabian Röling Feb 12 '19 at 14:27
  • Yeah, copy and pasted – Rdster Feb 12 '19 at 16:12
  • That command works if I put my name in...so I guess the syntax error isn't big enough to throw an error...but what is it? – Rdster Feb 12 '19 at 16:13

According to the error messages, it seemed that you are using Essentials? If you are not, the following will not ever be correct.

Use minecraft:give instead of give, since Essentials give command does not recognize selectors.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.