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
ConstructorDescriptionPositionalDamage
(@NotNull DamageType type, @NotNull Point sourcePosition, float amount) -
Method Summary
Modifier and TypeMethodDescription@NotNull Point
Gets 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:Damage
Gets the position of the source of the damage, or null if there is none. This may differ from the source entity's position.- Overrides:
getSourcePosition
in classDamage
- Returns:
- The source position
-