AntiCheatAddition
AntiCheatAddition copied to clipboard
🟢 | PotionEffects hider
Hide other entity potion effects for player. Nametags can draw entity potion effect.
@Override
public void onPacketSend(PacketSendEvent event) {
if (!enabled)
return;
if (event.getPacketType() == PacketType.Play.Server.ENTITY_EFFECT) {
WrapperPlayServerEntityEffect wrapper = new WrapperPlayServerEntityEffect(event);
if (wrapper.getEntityId() != player.entityID) {
// Cancel send packet about other entity potions.
event.setCancelled(true);
}
}
}