@EventHandler
    public void onEntityDamageByEntityEvent(EntityDamageByEntityEvent event) {
        if (main.isIngame()) {
            if (event.getEntity() instanceof Player) {
                main.updateHealth((Player)event.getEntity());
            }
            if (event.getDamager() instanceof Player && event.getEntity() instanceof Player) {
                main.playerListener.damageCounter.put((Player)event.getEntity(), (Player)event.getDamager());
            }
            if (event.getDamager() instanceof Player) {
                Player player = (Player)event.getDamager();
                if (main.getTeamByPlayer(player) == null) {
                    event.setCancelled(true);
                }
            }
        } else {
            event.setCancelled(true);
        }
    }