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
ConstructorsConstructorDescriptionEntityProjectileDamage
(@Nullable Entity shooter, Entity projectile, float amount) -
Method Summary
Modifier and TypeMethodDescriptionGets the projectile responsible for the damage.@Nullable Entity
Gets the shooter of the projectile.Gets the direct source of the damage.Methods inherited from class net.minestom.server.entity.damage.Damage
buildDeathMessage, buildDeathScreenText, fromEntity, fromPlayer, fromPosition, fromProjectile, getAmount, getAttacker, getGenericSound, getPlayerSound, getSound, getSourcePosition, getType, getTypeId, setAmount, tagHandler
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minestom.server.tag.Taggable
getAndSetTag, getAndUpdateTag, getTag, hasTag, removeTag, setTag, updateAndGetTag, updateTag
-
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.
-