endstone::ActorDamageEvent
Called when an Actor is damaged.
Bases: endstone::Cancellable< ActorEvent< Mob > >
Attributes:
Name | Description |
---|---|
NAME |
Functions:
Name | Description |
---|---|
ActorDamageEvent | |
getDamage | Gets the raw amount of damage caused by the event. |
getDamageSource | Get the source of damage. |
getEventName | |
setDamage | Sets the raw amount of damage caused by the event. |
NAME
const std::string endstone::ActorDamageEvent::NAME;
ActorDamageEvent
ActorDamageEvent(Mob &actor, std::unique_ptr<DamageSource> damage_source,
const float damage)
getDamage
float getDamage() const
Gets the raw amount of damage caused by the event.
Returns:
The raw amount of damage caused by the event
getDamageSource
DamageSource &getDamageSource() const
Get the source of damage.
Returns:
a DamageSource detailing the source of the damage.
getEventName
std::string getEventName() override const
Gets a user-friendly identifier for this event.
Returns:
name of this event
setDamage
void setDamage(const float damage)
Sets the raw amount of damage caused by the event.
Parameters:
damage
The raw amount of damage caused by the event
Last updated on