Separate names with a comma.
Comments in 'Plugin Development' started by ahoj_truhliku, Jul 19, 2015.
why is getEntity() method in PlayerDeathEvent()? shouldn´t be getPlayer()?
Let it be.
Players are Entities.
OMG i know but if it is PlayerDeathEvent so it can be only player and in all other Player events is method getPlayer()
So, why are you so annoyed about this? If you learn the API you have no problem with this.
i know but im asking if it is not wrong because in all Player events is getPlayer()
As I said, lol. Who cares. It works then good... (At least for me and @CraftYourBukkit)
It's not wrong. In that case, Event::getEntity() would be the same as Event::getPlayer()
i know but why there s not getPlayer() instead of getEntity() ? xD
Because PlayerDeathEvent isn't a PlayerEvent. It extends EntityDeathEvent.