Package de.marcely.bedwars.api.arena
Class PlayerDamageInfo
java.lang.Object
de.marcely.bedwars.api.arena.PlayerDamageInfo
Contains info of the last even in which a player directly or indirectly received damaged.
- See Also:
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionGet the player who directly/indirectly caused the game.getEvent()Get the event that was used to obtain this info from.Get the Instant when this info was obtained.@Nullable ProjectileTries to get the projectile that was used to damage the player.booleanGet whether the age of this object is larger thanMAX_AGE.
- 
Field Details- 
MAX_AGEGet the max age, until an instance is counted as invalid.
 
- 
- 
Constructor Details- 
PlayerDamageInfopublic PlayerDamageInfo()
 
- 
- 
Method Details- 
getDamagerGet the player who directly/indirectly caused the game.- Returns:
- The damaging player
 
- 
getEventGet the event that was used to obtain this info from.- Returns:
- The related event
 
- 
getInstantGet the Instant when this info was obtained.- Returns:
- The instant this info was constructed
 
- 
getProjectileDamagerTries to get the projectile that was used to damage the player.- Returns:
- The projectile used in this event. May be nullif none has been used
 
- 
isOutdatedpublic boolean isOutdated()Get whether the age of this object is larger thanMAX_AGE.- Returns:
- Get whether this object is outdated, and thus won't be used internally
 
 
-