Search in sources :

Example 1 with ConfigObject

use of main.java.sneakerbot.loaders.Config.ConfigObject in project SneakerBot by Penor.

the class Bot method init.

public static void init() {
    taskCount = 0;
    usedAccounts = 0;
    accounts = AdidasAccount.load("data/accounts.txt");
    proxies = Proxy.load("data/proxies.txt");
    usedProxies = new ArrayList<ProxyObject>();
    credentials = Credentials.load("data/credentials.json");
    configs = Config.load("data/config.json");
    captchas = new ArrayList<CaptchaResponse>();
    for (Object config : configs.stream().toArray()) taskCount += (int) ((ConfigObject) config).getTasks();
    pool = new ThreadPool(taskCount);
}
Also used : ProxyObject(main.java.sneakerbot.loaders.Proxy.ProxyObject) CaptchaResponse(main.java.sneakerbot.captcha.Harvester.CaptchaResponse) ThreadPool(main.java.sneakerbot.thread.ThreadPool) CredentialObject(main.java.sneakerbot.loaders.Credentials.CredentialObject) AccountObject(main.java.sneakerbot.loaders.AdidasAccount.AccountObject) ProxyObject(main.java.sneakerbot.loaders.Proxy.ProxyObject) ConfigObject(main.java.sneakerbot.loaders.Config.ConfigObject)

Aggregations

CaptchaResponse (main.java.sneakerbot.captcha.Harvester.CaptchaResponse)1 AccountObject (main.java.sneakerbot.loaders.AdidasAccount.AccountObject)1 ConfigObject (main.java.sneakerbot.loaders.Config.ConfigObject)1 CredentialObject (main.java.sneakerbot.loaders.Credentials.CredentialObject)1 ProxyObject (main.java.sneakerbot.loaders.Proxy.ProxyObject)1 ThreadPool (main.java.sneakerbot.thread.ThreadPool)1