SkullSplitterEventHandler.java 800 B

123456789101112131415161718192021222324
  1. package com.gmail.nossr50.skills.axes;
  2. import org.bukkit.entity.LivingEntity;
  3. import org.bukkit.entity.Player;
  4. import org.bukkit.event.entity.EntityDamageByEntityEvent;
  5. import com.gmail.nossr50.datatypes.SkillType;
  6. import com.gmail.nossr50.util.Combat;
  7. public class SkullSplitterEventHandler {
  8. private Player player;
  9. private LivingEntity target;
  10. private int damage;
  11. protected SkullSplitterEventHandler(AxeManager manager, EntityDamageByEntityEvent event) {
  12. this.player = manager.getPlayer();
  13. this.target = (LivingEntity) event.getEntity();
  14. this.damage = event.getDamage();
  15. }
  16. protected void applyAbilityEffects() {
  17. Combat.applyAbilityAoE(player, target, damage / Axes.skullSplitterModifier, SkillType.AXES);
  18. }
  19. }