Interface EntityXpSource

All Superinterfaces:
XpSource

public interface EntityXpSource extends XpSource
  • Method Details

    • getEntity

      @NotNull @NotNull String getEntity()
      Gets the name of the entity of the source.
      Returns:
      The entity name
    • getTriggers

      @NotNull @NotNull EntityXpSource.EntityTriggers[] getTriggers()
      Gets an array of triggers of the source.
      Returns:
      The triggers. If there is only one trigger, it will return an array with one element.
    • getDamagers

      Gets an array of damagers of the source. Xp will only be given if the damager matches.
      Returns:
      The damagers. If there is only one damager, it will return an array with one element.
    • scaleXpWithHealth

      boolean scaleXpWithHealth()
      Whether the XP multiplier for sources using the EntityXpSource.EntityTriggers.DAMAGE trigger should be scaled by the damaged mob's max health.
      Returns:
      whether to scale XP by health
    • getCauses

      @Nullable @Nullable DamageXpSource.DamageCause[] 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

      @Nullable @Nullable DamageXpSource.DamageCause[] getExcludedCauses()
      Gets the excluded damage causes of the source.
      Returns:
      The excluded damage causes, or null if there are none set.