If statement noop :)

I want to make a life sýstem in my game.
FX. You have 3 lifes and you die at 0

i tried for a while and came up with this:

when you die Lives() is called to check if you need to die or just loose one life
but this code just take all your lives at once.
how can i run this if statement once until lives() is called again? Thanks!

public void lives()
{

    if (lives > 1)
    {
        lives--;
    } 

else Die()

Thanks i will try that