Spawn a command block with a player's name

Spawn a command block with a player's name - Two Men Playing Volleyball Near Red Canopy

I want to have a command block with a button.
When clicking the button the command block should clear himself and spawn three new command blocks.
But here is the tricky part the new command blocks should have the name of the player who pressed the button.
Basically when the players name is Dinnerbone the new command blocks should have the command:

/tp @p[name=Dinnerbone] ~ ~1 ~-3

When the player who presses the button is named Notch the command of the new command blocks should be:

/tp @p[name=Notch] ~ ~1 ~-3

Is this even possible?






Pictures about "Spawn a command block with a player's name"

Spawn a command block with a player's name - Men Running Playing Football during Daytime
Spawn a command block with a player's name - Montevideo
Spawn a command block with a player's name - Woman Working in Home Office



How do you give a player a name with a command block?

You can use the following command: /title @a[x=301,y=29,z=150,r=4] title \xa74\xa7L You have successfully completed your task! Congratulations!



How to set the world spawn to a single block using command blocks | 1.8 [Tutorial | English]




Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

Images: Jim De Ramos, Pixabay, Fabricio Rivera, Ivan Samkov