Search in sources :

Example 1 with HealthMessage

use of net.glowstone.net.message.play.game.HealthMessage in project Glowstone by GlowstoneMC.

the class GlowPlayer method sendHealth.

private void sendHealth() {
    if (!hasJoined()) {
        return;
    }
    float finalHealth = (float) (getHealth() / getMaxHealth() * getHealthScale());
    session.send(new HealthMessage(finalHealth, getFoodLevel(), getSaturation()));
}
Also used : HealthMessage(net.glowstone.net.message.play.game.HealthMessage)

Aggregations

HealthMessage (net.glowstone.net.message.play.game.HealthMessage)1