Hello I just watched your stream and when I jumped into developing my own plugin, I noticed this error in my code:
ServerEvents.register(EntityDamageByEntityEvent, event => {
const damager = event.getDamager();
if (!damager) return;
if (damager.getType() !== EntityType.PLAYER) return;
damager.getWorld().strikeLightning(event.getEntity());
})
I was trying to make it when you hit an entity using the EntityDamageByEntityEvent lightning would strike it. But in fact I kept on getting a red underline (error?) under "(event.getEntity());" at the end of the code.
Hello I just watched your stream and when I jumped into developing my own plugin, I noticed this error in my code:
I was trying to make it when you hit an entity using the EntityDamageByEntityEvent lightning would strike it. But in fact I kept on getting a red underline (error?) under "(event.getEntity());" at the end of the code.