package nautilus.game.arcade.stats; import mineplex.core.common.util.*; import mineplex.minecraft.game.core.combat.event.*; import nautilus.game.arcade.game.*; import org.bukkit.entity.*; import org.bukkit.event.*; public class KillsStatTracker extends StatTracker { public KillsStatTracker(Game game) { super(game); } @EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR) public void onCombatDeath(CombatDeathEvent event) { if (event.GetLog().GetKiller() == null) return; if (!event.GetLog().GetKiller().IsPlayer()) return; Player player = UtilPlayer.searchExact(event.GetLog().GetKiller().GetName()); if (player == null) return; getGame().AddStat(player, "Kills", 1, false, false); getGame().AddStat(player, getGame().GetKit(player).GetName() + " Kills", 1, false, false); } }