<commit_before>package mypermissions;

import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.event.*;
import mypermissions.api.command.CommandManager;
import myessentials.config.ConfigProcessor;
import mypermissions.command.Commands;
import mypermissions.config.Config;
import mypermissions.localization.LocalizationProxy;
import mypermissions.localization.PermissionProxy;
import net.minecraftforge.common.config.Configuration;
import org.apache.logging.log4j.Logger;

import java.io.File;

@Mod(modid = Constants.MODID, name = Constants.MODNAME, version = Constants.VERSION, dependencies = Constants.DEPENDENCIES, acceptableRemoteVersions = "*")
public class MyPermissions {
    public Configuration config;
    public Logger LOG;

    @Mod.Instance(Constants.MODID)
    public static MyPermissions instance;

    @Mod.EventHandler
    public void preInit(FMLPreInitializationEvent ev) {
        LOG = ev.getModLog();
        Constants.CONFIG_FOLDER = ev.getModConfigurationDirectory().getPath() + "/MyPermissions/";
    }

    public void loadConfig() {
        config = new Configuration(new File(Constants.CONFIG_FOLDER, "MyPermissions.cfg"));
        ConfigProcessor.load(config, Config.class);
        PermissionProxy.init();
    }

    @Mod.EventHandler
    public void init(FMLInitializationEvent ev) {
    }

    @Mod.EventHandler
    public void postInit(FMLPostInitializationEvent ev) {
    }

    @Mod.EventHandler
    public void serverStarting(FMLServerStartingEvent ev) {
        loadConfig();
        CommandManager.registerCommands(Commands.class, null, LocalizationProxy.getLocalization(), null);
        CommandManager.registerCommands(Commands.MyPermissionManagerCommands.class, "mypermissions.cmd", LocalizationProxy.getLocalization(), null);
    }

    @Mod.EventHandler
    public void serverStopping(FMLServerStoppingEvent ev) {
    }
}<commit_msg>Made commands load only if the built-in system is used.<commit_after>package mypermissions;

import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.event.*;
import mypermissions.api.command.CommandManager;
import myessentials.config.ConfigProcessor;
import mypermissions.command.Commands;
import mypermissions.config.Config;
import mypermissions.localization.LocalizationProxy;
import mypermissions.localization.PermissionProxy;
import mypermissions.manager.MyPermissionsManager;
import net.minecraftforge.common.config.Configuration;
import org.apache.logging.log4j.Logger;

import java.io.File;

@Mod(modid = Constants.MODID, name = Constants.MODNAME, version = Constants.VERSION, dependencies = Constants.DEPENDENCIES, acceptableRemoteVersions = "*")
public class MyPermissions {
    public Configuration config;
    public Logger LOG;

    @Mod.Instance(Constants.MODID)
    public static MyPermissions instance;

    @Mod.EventHandler
    public void preInit(FMLPreInitializationEvent ev) {
        LOG = ev.getModLog();
        Constants.CONFIG_FOLDER = ev.getModConfigurationDirectory().getPath() + "/MyPermissions/";
    }

    public void loadConfig() {
        config = new Configuration(new File(Constants.CONFIG_FOLDER, "MyPermissions.cfg"));
        ConfigProcessor.load(config, Config.class);
        PermissionProxy.init();
    }

    @Mod.EventHandler
    public void init(FMLInitializationEvent ev) {
    }

    @Mod.EventHandler
    public void postInit(FMLPostInitializationEvent ev) {
    }

    @Mod.EventHandler
    public void serverStarting(FMLServerStartingEvent ev) {
        loadConfig();
        CommandManager.registerCommands(Commands.class, null, LocalizationProxy.getLocalization(), null);
        if(PermissionProxy.getPermissionManager() instanceof MyPermissionsManager) {
            CommandManager.registerCommands(Commands.MyPermissionManagerCommands.class, "mypermissions.cmd", LocalizationProxy.getLocalization(), null);
        }
    }

    @Mod.EventHandler
    public void serverStopping(FMLServerStoppingEvent ev) {
    }
}
{'fraction_non_alphanumeric': 0.09422492401215805, 'fraction_numerical': 0.0005065856129685917, 'mean_word_length': 4.469529085872576, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7050983', 'n_tokens_mistral': 1095, 'n_tokens_neox': 1102, 'n_words': 208}