Added ability to disable Meteor's API

This commit is contained in:
Cloudburst
2021-07-23 13:52:31 +02:00
parent a1d8e3d567
commit de891d6c6d
5 changed files with 100 additions and 1 deletions

View File

@@ -1,5 +1,7 @@
package cloudburst.rejects.utils;
import meteordevelopment.meteorclient.MeteorClient;
import java.util.Timer;
import java.util.TimerTask;
@@ -7,6 +9,10 @@ public class RejectsUtils {
public static int CPS = 0;
public static void init() {
Runtime.getRuntime().addShutdownHook(new Thread(() -> {
RejectsConfig.get().save(MeteorClient.FOLDER);
}));
new Timer().scheduleAtFixedRate(newTimerTaskFromLambda(() -> CPS = 0), 0, 1000);
}