#Is it possible to require a certain weapon to kill an entity?
11 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
I think its only possible with drops
in loot tables I think you can specify required tool/weapon
so you could have the dragon drop some custom item
actually I think I misunderstood your question
you want to prevent damage to dragon from other item than your sword?
EntityEvents.hurt('minecraft:ender_dragon', event => {
if(event.source.actual && event.source.actual.player && event.source.actual.mainHandItem.id !== 'minecraft:diamond_sword') {
event.cancel();
}
})
something like this maybe
maybe listen to death instead of hurt
Good point. Not sure if cancelling death works in every case, especially complicated entity like dragon tho