im trying to make a gravescroll that will stretch when used and upon finishing use will run the event to teleport the player to their last death, the death teleport part is easy enough but for some reason its not being used on right click and obviously is not running any events either. i posted an example of what im basically going for
StartupEvents.registry('item', event => {
event.create('grave_scroll').displayName('Grave Scroll')
.useAnimation("bow")
.useDuration((itemstack) => 64)
.finishUsing((Utils, entity, player, event) => {
if (entity.player)
{
global.gravescroll(entity)
}
})
})
global.gravescroll = (entity) => {
Utils.server.runCommand(`tell ${entity.player.name} Hi`)
}```this is the script so far












