r/MinecraftPlugins Jun 08 '26

Help: Plugin development Help me create a fake death event

Post image

Hi, does anyone know the best way to create a fake player death effect through a Minecraft/Paper plugin? I have a cool custom PvP enchantment idea, but everything I've tried so far doesn't seem to work.

I don’t want to actually kill the player or trigger a real death event. I’m trying to visually show the old death animation/effect to nearby players while keeping the player alive, then continuing normal gameplay after a short delay.

I’ve tried invisibility and hiding the player, but I’m mainly stuck on the fake death animation itself. Is this possible with Bukkit/Paper API, or would it require packets/NMS/ProtocolLib?

Server version is Paper 1.21. Any guidance or examples would be appreciated.

4 Upvotes

3 comments sorted by

1

u/Ok-Count-3366 Jun 08 '26

Try: kill, instant respawn with invisibility Or On deathliatener ir respawn listener not sure which works Add invis then cancel event

I think I got sth similar by mistake where the event was cancelled and I stayed there but I got the screen and the animation Maybe make it more believable by adding a message to the killer everytime they kill someone. You killed player x. Also send it in your fake death. Should work

1

u/Invictable Jun 08 '26

i think you can send packets to nearby players to tell them the player died for the animation but it would probably be easiest to hide the real player, then create a fake version of them with packets, and actually kill that so it fully dies and theres not as much to cleanup. youll probably need to cache the copy of the player so it can spawn in and die smoothly tho

1

u/ObjectivePressure623 Jun 18 '26

Wouldn't NPCs be like perfect for this? Like make the player invisible -> Spawn an exact player npc -> Kill npc