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