Renamed directory to anticope

This commit is contained in:
stormybytes
2021-10-24 09:50:26 +07:00
parent f9753eba09
commit d8c1ad1881
110 changed files with 233 additions and 243 deletions

View File

@@ -0,0 +1,32 @@
package anticope.rejects.utils;
import anticope.rejects.utils.seeds.Seeds;
import meteordevelopment.meteorclient.MeteorClient;
import java.util.Timer;
import java.util.TimerTask;
public class RejectsUtils {
public static int CPS = 0;
public static void init() {
Runtime.getRuntime().addShutdownHook(new Thread(() -> {
RejectsConfig.get().save(MeteorClient.FOLDER);
Seeds.get().save(MeteorClient.FOLDER);
}));
new Timer().scheduleAtFixedRate(newTimerTaskFromLambda(() -> CPS = 0), 0, 1000);
}
public static TimerTask newTimerTaskFromLambda(Runnable runnable)
{
return new TimerTask()
{
@Override
public void run()
{
runnable.run();
}
};
}
}