Hi! I have a question as I think the API is confusing (in this particular case) and I'd like to clarify things. So let's take as an example an EntityDamageEvent. Code (Java): @EventHandler public void onEntityDamage(EntityDamageEvent event) { EntityType et1 = event.getEntityType(); EntityType et2 = event.getEntity().getType(); } As you can see, to get the EntityType of the damaged entity, I can either call event.getEntityType(); or event.getEntity().getType();. The question is: why? Why are there two methods to do exactly the same thing? Is there any performance difference between the two? When should one be used instead of the other one? Thanks!
EntityDamageEvent#getEntityType() literally just calls getEntity().getType(), it's just a handy method to make life easier
That's what I thought. Thanks, even though I don't really see the point it probably takes like half a second more to write getEntity().getType() instead of getEntityType(). Still I understand that someone might find it useful. Thanks again!