1
Universal player head command
basically, im trying to summon a player head item, but not a specific players head, if that makes sense.
The command i'm currently working with is something like this:
/summon minecraft:item ~ ~2 ~ {Item:{id:player_head,Count:1,tag:{SkullOwner:<@s' username>}},Motion:[0d,0.1d,0d],Glowing:1b,Invulnerable:1b,NoGravity:1b,Tags:["ping"]}
but i need a command(s) that will give any user their own head... not sure how to go about it
The command i'm currently working with is something like this:
/summon minecraft:item ~ ~2 ~ {Item:{id:player_head,Count:1,tag:{SkullOwner:<@s' username>}},Motion:[0d,0.1d,0d],Glowing:1b,Invulnerable:1b,NoGravity:1b,Tags:["ping"]}
but i need a command(s) that will give any user their own head... not sure how to go about it
3
i've made what feels like a little bit of progress, after summoning the item i'm trying to modify it's nbt like this:
/data modify entity @e[type=item,sort=nearest,limit=1] Item.tag.SkullOwner set value {"selector":"@s"}
problem is that it doesn't actually give the player head the users name. It seems like i have to store {"selector":"@s"} somewhere else for it to actually become the user's name and then get the data from there, problem is i'm not sure where to store it. I don't really want to use a sign.
/data modify entity @e[type=item,sort=nearest,limit=1] Item.tag.SkullOwner set value {"selector":"@s"}
problem is that it doesn't actually give the player head the users name. It seems like i have to store {"selector":"@s"} somewhere else for it to actually become the user's name and then get the data from there, problem is i'm not sure where to store it. I don't really want to use a sign.
ok so i've been messing around with this and it doesn't seem like this is possible without string splicing, which im not sure is possible with minecraft commands... This is the result i currently get:

ok i don't think that image link worked, basically the player head's SkullOwner tag has a bunch of gibberish in it with my actual player name sprinkled in a couple times, in theory i could splice this string to get just my player name but i don't. know. how.
