1

Universal player head command

UserNinetyNine 4/28/23 4:23 pm
292
4/28/2023 6:30 pm
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:[&quot;ping&quot;]}
but i need a command(s) that will give any user their own head... not sure how to go about it
Posted by
UserNinetyNine
Level 2 : Apprentice Miner
1

  Have something to say?

JoinSign in

3

UserNinetyNine
04/28/2023 5:23 pm
Level 2 : Apprentice Miner
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.
1
UserNinetyNine
04/28/2023 6:27 pm
Level 2 : Apprentice Miner
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:
aaaaaaaaaaaaa
1
UserNinetyNine
04/28/2023 6:30 pm
Level 2 : Apprentice Miner
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.
1

Welcome