Package org.spout.vanilla.component.entity.misc

Examples of org.spout.vanilla.component.entity.misc.Health.kill()


    Health health = player.get(Health.class);
    if (health == null) {
      throw new CommandException(player.getDisplayName() + " can not be killed.");
    }
    health.kill(HealthChangeCause.COMMAND);
  }

  @CommandDescription (aliases = {"version", "vr"}, usage = "", desc = "Print out the version information for Vanilla")
  @Permissible ("vanilla.command.version")
  public void getVersion(CommandSource source, CommandArguments args) throws ArgumentParseException {
View Full Code Here


    assertEquals(20.0f, health.getHealth(), 0.0f);

    health.damage(1.0f);
    assertEquals(19.0f, health.getHealth(), 0.0f);

    health.kill(HealthChangeCause.DAMAGE);
    assertEquals(0.0f, health.getHealth(), 0.0f);
    assertTrue(health.isDead());

    health.heal(5.0f);
    assertEquals(5.0f, health.getHealth(), 0.0f);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.