Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

API sethealth?

Comments in 'Plugin Development' started by jython234, Nov 5, 2013.

  1. jython234
    Offline

    jython234 Notable Member Plugin Developer

    Joined:
    Nov 4, 2013
    Posts:
    324
    Plugins:
    1
    Minecraft User:
    jython234
    How do you kill a player with the API?

    Thanks!
  2. Glitchmaster_PE
    Offline

    Glitchmaster_PE Notable Member Plugin Developer

    Joined:
    Aug 31, 2013
    Posts:
    834
    Plugins:
    8
    Minecraft User:
    Glitchmaster_PE
    You could do:

    PHP:
    $this->api->console->run("kill " $player);
  3. jython234
    Offline

    jython234 Notable Member Plugin Developer

    Joined:
    Nov 4, 2013
    Posts:
    324
    Plugins:
    1
    Minecraft User:
    jython234
    Oh!
  4. Falk
    Offline

    Falk Staff Member Global Moderator

    Joined:
    Sep 2, 2013
    Posts:
    1,710
    Plugins:
    22
    Minecraft User:
    Falkirknh
    There is also set health:
    PHP:
    $player->setHealth(0"none");
    You would have to get the player first though.

Share This Page

Advertisement