Class PositionalDamage
java.lang.Object
net.minestom.server.entity.damage.Damage
net.minestom.server.entity.damage.PositionalDamage
- All Implemented Interfaces:
Taggable,TagReadable,TagWritable
Represents damage that is associated with a certain position.
-
Constructor Summary
ConstructorsConstructorDescriptionPositionalDamage(@NotNull DamageType type, @NotNull Point sourcePosition, float amount) -
Method Summary
Modifier and TypeMethodDescription@NotNull PointGets the position of the source of the damage, or null if there is none.Methods inherited from class net.minestom.server.entity.damage.Damage
buildDeathMessage, buildDeathScreenText, fromEntity, fromPlayer, fromPosition, fromProjectile, getAmount, getAttacker, getGenericSound, getPlayerSound, getSound, getSource, getType, setAmount, tagHandler
-
Constructor Details
-
PositionalDamage
public PositionalDamage(@NotNull @NotNull DamageType type, @NotNull @NotNull Point sourcePosition, float amount)
-
-
Method Details
-
getSourcePosition
Description copied from class:DamageGets the position of the source of the damage, or null if there is none. This may differ from the source entity's position.- Overrides:
getSourcePositionin classDamage- Returns:
- The source position
-