JavaScript is disabled on your browser.
Nested Class Summary
Nested Classes
Method Summary
All Methods Instance Methods Abstract Methods
Gets the valid damage causes of the source.
int
Gets the cooldown of gaining XP again in milliseconds.
Gets the damager of the source.
Gets the valid damagers of the source.
Gets the excluded damage causes of the source.
Gets the excluded damagers of the source.
boolean
Gets whether being damaged by projectiles whose shooter matches the damager of the source should be
counted as part of the source.
boolean
Gets whether the player must survive to be granted xp.
boolean
Gets whether the original damage should be used to calculate the xp.
Method Details
getCauses
Gets the valid damage causes of the source.
Returns:
The damage causes. If there are no damage causes set (all damage causes valid), it will return null.
getExcludedCauses
Gets the excluded damage causes of the source.
Returns:
The excluded damage causes, or null if there are none set.
getDamager
@Nullable
@Nullable String getDamager ()
Gets the damager of the source. This is only applicable if the
player was damaged by an entity. If there are multiple valid damagers,
it returns the first one.
Returns:
The damager, or null if not applicable.
getDamagers
@Nullable
@Nullable String [] getDamagers ()
Gets the valid damagers of the source. This is only applicable if the
player was damaged by an entity.
Returns:
the damager, or null if not defined.
getExcludedDamagers
@Nullable
@Nullable String [] getExcludedDamagers ()
Gets the excluded damagers of the source.
Returns:
the excluded damagers, or null if not defined.
mustSurvive
boolean mustSurvive ()
Gets whether the player must survive to be granted xp.
Returns:
Whether the player must survive
useOriginalDamage
boolean useOriginalDamage ()
Gets whether the original damage should be used to calculate the xp.
Returns:
Whether the original damage should be used
includeProjectiles
boolean includeProjectiles ()
Gets whether being damaged by projectiles whose shooter matches the damager of the source should be
counted as part of the source.
Returns:
Whether projectiles shot from the damager gives XP
getCooldownMs
int getCooldownMs ()
Gets the cooldown of gaining XP again in milliseconds. The cooldown applies
globally to all damage source instances.
Returns:
the cooldown in milliseconds