Class DamageXpGainEvent

java.lang.Object
org.bukkit.event.Event
dev.aurelium.auraskills.api.event.skill.XpGainEvent
dev.aurelium.auraskills.api.event.skill.DamageXpGainEvent
All Implemented Interfaces:
org.bukkit.event.Cancellable

public class DamageXpGainEvent extends XpGainEvent
Called when a player gains XP for being damaged by an entity. By default, this is the Defense skill.
  • Constructor Details

    • DamageXpGainEvent

      public DamageXpGainEvent(org.bukkit.entity.Player player, SkillsUser user, Skill skill, @Nullable @Nullable XpSource source, double amount, DamageXpSource.DamageCause cause, @Nullable @Nullable org.bukkit.entity.Entity damager, org.bukkit.event.entity.EntityEvent originalEvent)
  • Method Details

    • getCause

      public DamageXpSource.DamageCause getCause()
      Gets the cause of the damage
      Returns:
      the damage cause
    • getDamager

      @Nullable public @Nullable org.bukkit.entity.Entity getDamager()
      Get the entity that damaged the player if the damage was caused by an entity
      Returns:
      the damager, or null if non-entity damage
    • getOriginalEvent

      public org.bukkit.event.entity.EntityEvent getOriginalEvent()
      Gets the original event for the player being damaged
      Returns:
      the original event