use of net.glowstone.net.message.play.entity.EntityRemoveEffectMessage in project Glowstone by GlowstoneMC.
the class GlowLivingEntity method removePotionEffect.
@Override
public void removePotionEffect(PotionEffectType type) {
if (!hasPotionEffect(type)) {
return;
}
potionEffects.remove(type);
potionEffectsChanged = true;
EntityRemoveEffectMessage msg = new EntityRemoveEffectMessage(getEntityId(), type.getId());
for (GlowPlayer player : world.getRawPlayers()) {
if (player.canSeeEntity(this) || player == this) {
player.getSession().send(msg);
}
}
}
Aggregations