@EventHandler
    protected void onPlayerQuit(PlayerQuitEvent event) {
        Player player = event.getPlayer();
        ScavDuelsPlayer dPlayer2 = ScavDuels.scavDuelsPlayer.get(player.getName());
        if (dPlayer2 != null && dPlayer2.isDueling) {
            Arena arena = null;
            for (Arena tempArena : ArenaList) {
                if (tempArena.name.equalsIgnoreCase(dPlayer2.ArenaName)) {
                    arena = tempArena;
                    break;
                }
            }
            if (arena == null || !arena.isRunning) {
                dPlayer2.isDueling = false;
            }
            else{
                arena.StopArenaOnLeave(dPlayer2);
            }
            
            ScavDuels.scavDuelsPlayer.remove(player.getName());
            
        }
    }