#Item Rename

1 messages · Page 1 of 1 (latest)

golden radish
#

Hello, does anyone know how to give a renamed item with scripts? Example "My epic sword"

placid roost
#
//equipable component allows you set set equipment
const equ = player.getComponent('equipable')

//defines the item
let myEpicSword = new ItemStack('minecraft:diamond_sword')

//changes the item name
myEpicSword.nameTag = '§gMy Epic Sword'

//sets the item
equ.setEquipment(EquipmentSlot.Mainhand, myEpicSword)
golden radish
#

Thanks!