![]() |
FourKit 1469f90c
The LCE C# Server Plugin API
|
This will go over how to utilize each event that FourKit provides.
EntityDamageEvent and EntityDamageByEntityEvent are fired when any entity is damaged.
When one of these events are fired, it passes an entity. It can be a Player, or any LivingEntity
You can check what type of entity it is with getEntityType(). This will return a EntityType enum.
From there, you can cast the entity to the actual type (in this case LivingEntity):
Or if its a player, you can even cast it to Player:
As of right now, this event is only fired for LivingEntity and Players.