#Rename an item depending on the nbt

2 messages · Page 1 of 1 (latest)

crimson falcon
#

Hello, I want to change the name of an item depending on the name.
In fact, I need more than than

if (entity.player) {
    const playerName = entity.username
    entity.give(Item.of('create_utopia:player_soul', `{Player:${playerName}}`));
}

first i want to get player name (solved)
Then, i want the item display name be 'Player_name Soul' depending on the Player nbt
How can I do that ?

For information i'm in a .finishUsing((itemstack, level, entity) => {}) method

Thanks

chilly lynxBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!