diff --git a/core/src/main/java/tc/oc/pgm/filters/matcher/CauseFilter.java b/core/src/main/java/tc/oc/pgm/filters/matcher/CauseFilter.java index e5b5eb7761..00cbc78b8b 100644 --- a/core/src/main/java/tc/oc/pgm/filters/matcher/CauseFilter.java +++ b/core/src/main/java/tc/oc/pgm/filters/matcher/CauseFilter.java @@ -77,14 +77,12 @@ public boolean matches(MatchQuery query) { event = ((GeneralizedEvent) event).getCause(); } - TrackerMatchModule tracker = query.moduleRequire(TrackerMatchModule.class); - EntityDamageEvent.DamageCause damageCause = null; DamageInfo damageInfo = null; boolean punchDamage = false; if (event instanceof EntityDamageEvent damageEvent) { damageCause = damageEvent.getCause(); - damageInfo = tracker.resolveDamage(damageEvent); + damageInfo = query.moduleRequire(TrackerMatchModule.class).resolveDamage(damageEvent); if (damageInfo instanceof MeleeInfo) { PhysicalInfo weapon = ((MeleeInfo) damageInfo).getWeapon(); if (weapon instanceof ItemInfo && ((ItemInfo) weapon).getItem().getType() == Material.AIR) {