Class EntityProjectileDamage
java.lang.Object
net.minestom.server.entity.damage.Damage
net.minestom.server.entity.damage.EntityProjectileDamage
- All Implemented Interfaces:
Taggable
,TagReadable
,TagWritable
Represents damage inflicted by an entity, via a projectile.
-
Constructor Summary
ConstructorDescriptionEntityProjectileDamage
(@Nullable Entity shooter, @NotNull Entity projectile, float amount) -
Method Summary
Methods inherited from class net.minestom.server.entity.damage.Damage
buildDeathMessage, buildDeathScreenText, fromEntity, fromPlayer, fromPosition, fromProjectile, getAmount, getAttacker, getGenericSound, getPlayerSound, getSound, getSourcePosition, getType, setAmount, tagHandler
-
Constructor Details
-
EntityProjectileDamage
-
-
Method Details
-
getProjectile
Gets the projectile responsible for the damage.- Returns:
- the projectile
-
getShooter
Gets the shooter of the projectile.- Returns:
- the shooter of the projectile, null if not any
-
getSource
Description copied from class:Damage
Gets the direct source of the damage. This is the entity that directly causes the damage, like a projectile, or null if there was none.
-