Skip to content

Commit

Permalink
misc: Monitor on the event
Browse files Browse the repository at this point in the history
  • Loading branch information
MATRIX-feather committed Nov 10, 2024
1 parent 0a1f49f commit 4f9fd5c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.entity.EntityDamageByEntityEvent;
import xyz.nifeather.morph.abilities.MorphAbility;
import xyz.nifeather.morph.storage.skill.ISkillOption;

public abstract class OnAttackAbility<T extends ISkillOption> extends MorphAbility<T>
{
@EventHandler(ignoreCancelled = true)
@EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR)
public void onEntityDamagedByEntity(EntityDamageByEntityEvent e)
{
if (!(e.getDamager() instanceof Player player)) return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,6 @@ public class ExtraKnockbackAbility extends OnAttackAbility<ExtraKnockbackOption>
return AbilityType.EXTRA_KNOCKBACK;
}

/*
@EventHandler
private void onGolemDmg(EntityDamageByEntityEvent e)
{
if (!(e.getDamager() instanceof CraftIronGolem craftIronGolem)) return;
if (!(e.getEntity() instanceof CraftPlayer craftPlayer)) return;
logger.info("VECTOR: %s".formatted(craftPlayer.getHandle().getDeltaMovement()));
this.addSchedule(() ->
{
logger.info("SCHED VECTOR: %s".formatted(craftPlayer.getHandle().getDeltaMovement()));
});
}
*/

@Resolved(shouldSolveImmediately = true)
private MorphManager manager;

Expand Down

0 comments on commit 4f9fd5c

Please sign in to comment.