Easy NPC

Easy NPC

2M Downloads

Unhittable NPCs can be killed using Bow

Kooreh opened this issue ยท 2 comments

commented

the title says it all; the npcs that is not supposed to be hitable can be killed using the bow and arrow.
I realized this when some of my folk killed the npcs I set up in my server, please make them unable to be killed or hit by the arrow;

commented

Thanks for the report. Could you please share the following additional details:

  • Game mode of the server ?
  • If PvP is enabled ?
  • Game mod of the player using the bow ?
  • Permission level of the player using the bow ?

All NPCs using the standard "setInvulnerable(true);" setting for Entities, see:

This setting is ignored in creative mod and/or if the user has an OP permission level.
In this case the player would be able to deal damage with an bow, trident or crossbow.

If this is not the case, I could add a checkbox which simply ignore all damage to the NPC, regardless of the game mod or permission level of the player. Thanks.

commented

thanks for getting back to me, to answer your question

  • the server is running on a forge 1.19.2 hard survival, with few people accessible on the OPs.
  • the folk who killed the npc was indeed was an Op.
  • they were on the survival mode, yes.

now that you reply it, I think it was ignored as the player had an op;
could there be a option where even the Op could not harm the npc in any way? the melee is already blocked even to the op, so I think preventing the bow damage would do it.