use of net.glowstone.net.message.play.entity.EntityStatusMessage in project Glowstone by GlowstoneMC.
the class GlowEntity method playEffect.
@Override
public void playEffect(EntityEffect type) {
if (type.getApplicable().isInstance(this)) {
EntityStatusMessage message = new EntityStatusMessage(entityId, type);
world.getRawPlayers().stream().filter(player -> player.canSeeEntity(this)).forEach(player -> player.getSession().send(message));
}
}
use of net.glowstone.net.message.play.entity.EntityStatusMessage in project Glowstone by GlowstoneMC.
the class GlowEntity method playEffectKnownAndSelf.
public void playEffectKnownAndSelf(EntityEffect type) {
if (type.getApplicable().isInstance(this)) {
EntityStatusMessage message = new EntityStatusMessage(entityId, type);
if (this instanceof GlowPlayer) {
((GlowPlayer) this).getSession().send(message);
}
world.getRawPlayers().stream().filter(player -> player.canSeeEntity(this)).forEach(player -> player.getSession().send(message));
}
}
Aggregations