3

Sorry for my English. It would be like

/give @p diamond_sword 1 0 {display:{Name:@p}} 

but this obviously is not working. Thank You.

1
  • I don't know if this is possible. As far as I know, all values in data tags need to be literals. – MBraedley Jun 29 '15 at 1:11
1

I spent I few hours researching this one! An answer by JooshNF:

This is not possible unless you know all the players who will press it. If so, you would need a setup like this;

http://i.imgur.com/0aYTzT9.png

Command 1: /execute @e[type=WitherSkull] ~ ~ ~ /testfor @p[name=(player's name),r=5]

Command 2: /setblock x y z command_block 0 replace {Command:"/give @p (item) 1 0 {display:{Name"(player's name)"}}}

To summon witherskull: /summon WitherSkull ~ ~ ~ {direction:[0.0,0.0,0.0]} So, this is basically impossible.

Click here for original thread.
If I helped you, please mark this up, and, if you found it useful, please mark as answer.

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.