Examples of PlayerHealthEvent


Examples of org.spout.vanilla.event.player.network.PlayerHealthEvent

    return (Player) getOwner();
  }

  public void reload() {
    if (getOwner().getEngine() instanceof Server) {
      getPlayer().getNetwork().callProtocolEvent(new PlayerHealthEvent(getPlayer()));
    }
  }
View Full Code Here

Examples of org.spout.vanilla.event.player.network.PlayerHealthEvent

    // Special cases
    Entity owner = getOwner();
    if (Spout.getPlatform() == Platform.SERVER) {
      if (owner instanceof Player) {
        owner.getNetwork().callProtocolEvent(new PlayerHealthEvent((Player) getOwner()));
      } else if (owner instanceof EnderDragon || owner instanceof Wither) {
        java.util.List<Parameter<?>> params = new ArrayList<Parameter<?>>(1);
        params.add(new Parameter<Short>(Parameter.TYPE_SHORT, 16, (short) health));
        owner.getNetwork().callProtocolEvent(new EntityMetaChangeEvent(owner, params));
      }
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.