// Path: src/main/java/top/dreamcity/AntiCheat/AntiCheat.java
// public class AntiCheat extends PluginBase implements AntiCheatAPI {
// 
//     private static AntiCheat instance;
//     private static MasterConfig masterConfig;
//     private PlayerCheatRecord playerCheatRecord;
//     public static HashMap<String, top.dreamcity.AntiCheat.Cheat.AntiCheat.CheatType> reportPlayer = new HashMap<>();
//     public static HashMap<String, Report> reportThread = new HashMap<>();
//     public static HashSet<String> DemoPlayer = new HashSet<>();
// 
//     public static AntiCheat getInstance() {
//         return instance;
//     }
// 
// 
//     @Override
//     public void onLoad() {
//         instance = this;
//         this.saveResource("Steve.png");
//         this.getLogger().notice("AntiCheat - Load");
//     }
// 
//     @Override
//     public void onEnable() {
// 
//         initConfig();
// 
//         initAntiThread();
// 
//         Server.getInstance().getCommandMap().register("", new ReportCommand());
// 
//         this.getServer().getPluginManager().registerEvents(new EventListener(), this);
// 
//         this.getLogger().notice("AntiCheat - Enable");
//     }
// 
//     @Override
//     public void onDisable() {
//         this.getLogger().notice("AntiCheat - Disable");
//     }
// 
//     private void initAntiThread() {
//         //this.getServer().getScheduler().scheduleRepeatingTask(new AntiSpeedThread(this),1);
//         new AntiSpeedThread();
//         new CheckChatThread();
//         new AntiFlyThread();
//         new AntiWaterWalkThread();
//     }
// 
//     private void initConfig() {
//         Config c = new Config(this.getDataFolder() + "/config.yml", Config.YAML);
//         masterConfig = new MasterConfig(c.getRootSection());
//         if (masterConfig.isEmpty()) {
//             this.getLogger().warning("The Config is empty!");
//         }
//         playerCheatRecord = new PlayerCheatRecord(new Config(this.getDataFolder() + "/record.yml", Config.YAML).getRootSection());
//     }
// 
//     @Override
//     public void addRecord(Player player, top.dreamcity.AntiCheat.Cheat.AntiCheat.CheatType cheatType) {
//         playerCheatRecord.addRecord(player, cheatType);
//     }
// 
//     @Override
//     public MasterConfig getMasterConfig() {
//         return masterConfig;
//     }
// 
// }
// 
// Path: src/main/java/top/dreamcity/AntiCheat/AntiCheatAPI.java
// public interface AntiCheatAPI {
// 
//     static AntiCheat getInstance() {
//         return AntiCheat.getInstance();
//     }
// 
//     MasterConfig getMasterConfig();
// 
//     void addRecord(Player player, top.dreamcity.AntiCheat.Cheat.AntiCheat.CheatType cheatType);
// 
// }


import cn.nukkit.utils.Config;
import cn.nukkit.utils.ConfigSection;
import top.dreamcity.AntiCheat.AntiCheat;
import top.dreamcity.AntiCheat.AntiCheatAPI;
import java.util.ArrayList;

            maxMoveSpeed = (float) config.getDouble("maxMoveSpeed");
            pingNoCheckValue = config.getInt("pingNoCheckValue");
            inAirTimeCheck = config.getInt("inAirTimeCheck");
            chatSec = config.getInt("chatSec");
            checkKillAuraCPS = config.getInt("checkKillAuraCPS");
            SensitiveWords = (ArrayList) config.get("SensitiveWords");
            SkinPath = config.getString("RobotSkinPath");
        } else {
            spawnDefaultConfig();
        }
    }

    public void spawnDefaultConfig() {
        AntiCheat.getInstance().getLogger().notice("Start spawning default config.");
        antiSpeed = true;
        checkBB = true;
        antiFly = true;
        checkChat = true;
        checkChatWord = true;
        antiKillAura = true;
        antiAutoAim = true;
        antiSpeedPingCheck = true;
        maxMoveSpeed = 10F;
        pingNoCheckValue = 25;
        inAirTimeCheck = 5;
        chatSec = 2;
        checkKillAuraCPS = 3;
        SensitiveWords = new ArrayList<>();
        SensitiveWords.add("fuck");
        SensitiveWords.add("shit");

// Path: src/main/java/top/dreamcity/AntiCheat/AntiCheat.java
// public class AntiCheat extends PluginBase implements AntiCheatAPI {
// 
//     private static AntiCheat instance;
//     private static MasterConfig masterConfig;
//     private PlayerCheatRecord playerCheatRecord;
//     public static HashMap<String, top.dreamcity.AntiCheat.Cheat.AntiCheat.CheatType> reportPlayer = new HashMap<>();
//     public static HashMap<String, Report> reportThread = new HashMap<>();
//     public static HashSet<String> DemoPlayer = new HashSet<>();
// 
//     public static AntiCheat getInstance() {
//         return instance;
//     }
// 
// 
//     @Override
//     public void onLoad() {
//         instance = this;
//         this.saveResource("Steve.png");
//         this.getLogger().notice("AntiCheat - Load");
//     }
// 
//     @Override
//     public void onEnable() {
// 
//         initConfig();
// 
//         initAntiThread();
// 
//         Server.getInstance().getCommandMap().register("", new ReportCommand());
// 
//         this.getServer().getPluginManager().registerEvents(new EventListener(), this);
// 
//         this.getLogger().notice("AntiCheat - Enable");
//     }
// 
//     @Override
//     public void onDisable() {
//         this.getLogger().notice("AntiCheat - Disable");
//     }
// 
//     private void initAntiThread() {
//         //this.getServer().getScheduler().scheduleRepeatingTask(new AntiSpeedThread(this),1);
//         new AntiSpeedThread();
//         new CheckChatThread();
//         new AntiFlyThread();
//         new AntiWaterWalkThread();
//     }
// 
//     private void initConfig() {
//         Config c = new Config(this.getDataFolder() + "/config.yml", Config.YAML);
//         masterConfig = new MasterConfig(c.getRootSection());
//         if (masterConfig.isEmpty()) {
//             this.getLogger().warning("The Config is empty!");
//         }
//         playerCheatRecord = new PlayerCheatRecord(new Config(this.getDataFolder() + "/record.yml", Config.YAML).getRootSection());
//     }
// 
//     @Override
//     public void addRecord(Player player, top.dreamcity.AntiCheat.Cheat.AntiCheat.CheatType cheatType) {
//         playerCheatRecord.addRecord(player, cheatType);
//     }
// 
//     @Override
//     public MasterConfig getMasterConfig() {
//         return masterConfig;
//     }
// 
// }
// 
// Path: src/main/java/top/dreamcity/AntiCheat/AntiCheatAPI.java
// public interface AntiCheatAPI {
// 
//     static AntiCheat getInstance() {
//         return AntiCheat.getInstance();
//     }
// 
//     MasterConfig getMasterConfig();
// 
//     void addRecord(Player player, top.dreamcity.AntiCheat.Cheat.AntiCheat.CheatType cheatType);
// 
// }


// Path: src/main/java/top/dreamcity/AntiCheat/Config/MasterConfig.java
import cn.nukkit.utils.Config;
import cn.nukkit.utils.ConfigSection;
import top.dreamcity.AntiCheat.AntiCheat;
import top.dreamcity.AntiCheat.AntiCheatAPI;
import java.util.ArrayList;

            maxMoveSpeed = (float) config.getDouble("maxMoveSpeed");
            pingNoCheckValue = config.getInt("pingNoCheckValue");
            inAirTimeCheck = config.getInt("inAirTimeCheck");
            chatSec = config.getInt("chatSec");
            checkKillAuraCPS = config.getInt("checkKillAuraCPS");
            SensitiveWords = (ArrayList) config.get("SensitiveWords");
            SkinPath = config.getString("RobotSkinPath");
        } else {
            spawnDefaultConfig();
        }
    }

    public void spawnDefaultConfig() {
        AntiCheat.getInstance().getLogger().notice("Start spawning default config.");
        antiSpeed = true;
        checkBB = true;
        antiFly = true;
        checkChat = true;
        checkChatWord = true;
        antiKillAura = true;
        antiAutoAim = true;
        antiSpeedPingCheck = true;
        maxMoveSpeed = 10F;
        pingNoCheckValue = 25;
        inAirTimeCheck = 5;
        chatSec = 2;
        checkKillAuraCPS = 3;
        SensitiveWords = new ArrayList<>();
        SensitiveWords.add("fuck");
        SensitiveWords.add("shit");

        SkinPath = AntiCheatAPI.getInstance().getDataFolder() + "/Steve.png";
