Minecraft not lose a certain item?

Ea
1

I'm looking for a script that allows me not to lose a certain slot when dead.
So someone kills me, I lose everything except slot number 1 for example.

Gr

I don't think that something like this is possible without plugins or on "normal" servers.

Rather, I'm very sure that this already falls in the direction of the hack client.

Unless you want to do it on your own server / world.

Then unfortunately I have no idea