Class EntityDamageEvent
Dispatched when an Entity gets damaged
Namespace: OpenAPI.Events.Entity
Assembly: OpenAPI.dll
Syntax
public class EntityDamageEvent : EntityEvent
Constructors
| Improve this Doc View SourceEntityDamageEvent(MiNET.Entities.Entity, MiNET.Entities.Entity, DamageCause, Int32, Int32)
Declaration
public EntityDamageEvent(MiNET.Entities.Entity entity, MiNET.Entities.Entity source, DamageCause cause, int previousHealth, int newHealth)
Parameters
Type | Name | Description |
---|---|---|
MiNET.Entities.Entity | entity | The entity that has been damaged |
MiNET.Entities.Entity | source | The source of the of the damage |
DamageCause | cause | The cause of the damage |
System.Int32 | previousHealth | The entity's previous health value |
System.Int32 | newHealth | The entity's new health value |
Properties
| Improve this Doc View SourceAttacker
Declaration
public MiNET.Entities.Entity Attacker { get; }
Property Value
Type | Description |
---|---|
MiNET.Entities.Entity |
Cause
Declaration
public DamageCause Cause { get; }
Property Value
Type | Description |
---|---|
DamageCause |
NewHealth
Declaration
public int NewHealth { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
PreviousHealth
Declaration
public int PreviousHealth { get; }
Property Value
Type | Description |
---|---|
System.Int32 |