#How do you check for item nbt when firing events?
6 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
Ticket closed!
figured it out lol
Please post how you solved your issue. Others may find this ticket later, but then have to create another because the actual solution wasn't mentioned. thanks <3
ItemEvents.rightClicked('minecraft:map', event => {
// event.server.scheduleInTicks(10, _ => {
const nbt = {display:{Name:'["",{"text":"Deep Dark Explorer Map","bold":true,"color":"blue"}]'}}
if (event.item.nbt == nbt){
event.server.runCommandSilent(`say sex`)
event.server.runCommandSilent(`execute as @p run item modify entity @s weapon.mainhand chocolate:city_map`)
event.cancel()
}
})