How to damage player every second when his level is zero

Discussion in 'Plugin Development' started by bars96, Dec 5, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    bars96

    Let's go in water and wait for suffocation. Did you see that: you don't die, you get damage in 2 half-hearts every second.

    I make plugin that add thirst in game. Every minute (via runTaskTimer()) player's exp level (thirst) decreases (-1).

    How to damage player every second (1 heart) when his exp level (thirst) reached 0?

    [​IMG]

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 5, 2016
  2. Offline

    willy00

    if (player.getxplevel() == (0)) {
    player.setHeaalth(player.getHealth -2)
    return;
    }
     
  3. You could use PrintScreen instead of capturing images of your screen using your camera.
     
  4. Offline

    bars96

    I start this thread via mobile phone. I have not USB cable or card reader because I not at home.

    It damage player once. I have repeat getting damage every second while player not die.

    Because player must have time to drink (if he forgot to drink when thirst >0) before thirst kill him.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 5, 2016
  5. Offline

    bars96

    Help me
     
Thread Status:
Not open for further replies.

Share This Page