Listener public void GetAllDamage DamageEntityEvent if getTargetEntity

1
2
3
4
5
6
7
8
9
@Listener
public void GetAllDamage(DamageEntityEvent e) {
if (e.getTargetEntity().getType().getId().equals("minecraft:player")) {
if (e.getSource().toString().hashCode() == 1663268944) {//source radiation effect
e.setCancelled(true);
logger.info("Radiation damage cancel");
}
}
}