TransWikia.com

Get head from world coordinate and give it to player

Arqade Asked on October 14, 2020

I have placed multiple heads with different skin but same player name. I’m doing this because I can’t afford multiple minecraft accounts. How do I get the head and give it to player inventory using commands?

How can I modify this to place it into the player’s helmet slot?

One Answer

If the head is inside a template chest, you can use /clone to clone the chest to a player's position, and use /setblock in destroy mode to cause the chest to drop the head on the player.

  1. Clone the chest to player's position.

    /execute at @p run clone Tx Ty Tz Tx Ty Tz ~ ~ ~
    

    T: Location of template chest.

  2. Set the chest to air, causing it to drop all the items on the player.

    /execute at @p run setblock ~ ~ ~ air destroy
    
  3. Delete the chest entity.

    /kill @e[type=item,nbt={id:"minecraft:chest"}]
    

Answered by ExpertCoder14 on October 14, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP