Examples of PlayerHealthMessage


Examples of org.spout.vanilla.protocol.msg.player.PlayerHealthMessage

  }

  @EventHandler
  public void onPlayerUpdateStats(PlayerHealthEvent event) {
    Hunger hunger = getOwner().get(Hunger.class);
    event.getMessages().add(new PlayerHealthMessage(getOwner().get(Human.class).getHealth().getHealth(), (short) hunger.getHunger(), hunger.getFoodSaturation()));
  }
View Full Code Here

Examples of org.spout.vanilla.protocol.msg.player.PlayerHealthMessage

  @Override
  public PlayerHealthMessage decode(ByteBuf buffer) throws IOException {
    float health = buffer.readFloat();
    short food = buffer.readShort();
    float foodSaturation = buffer.readFloat();
    return new PlayerHealthMessage(health, food, foodSaturation);
  }
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.