use of com.github.sirblobman.combatlogx.api.manager.ICombatManager in project CombatLogX by SirBlobman.
the class ListenerCrackShot method onAttack.
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onAttack(WeaponDamageEntityEvent e) {
Entity entity = e.getVictim();
if (!(entity instanceof Player))
return;
Player damaged = (Player) entity;
Player damager = e.getPlayer();
ICombatManager combatManager = getCombatManager();
combatManager.tag(damager, damaged, TagType.PLAYER, TagReason.ATTACKER);
combatManager.tag(damaged, damager, TagType.PLAYER, TagReason.ATTACKED);
}
Aggregations