2020-07-10 15:51:27 +02:00
|
|
|
package io.gitlab.jfronny.translater;
|
|
|
|
|
2020-07-10 20:46:39 +02:00
|
|
|
import me.sargunvohra.mcmods.autoconfig1u.AutoConfig;
|
|
|
|
import me.sargunvohra.mcmods.autoconfig1u.serializer.JanksonConfigSerializer;
|
2020-07-10 15:51:27 +02:00
|
|
|
import net.fabricmc.api.ModInitializer;
|
|
|
|
import org.apache.logging.log4j.Level;
|
|
|
|
import org.apache.logging.log4j.LogManager;
|
|
|
|
import org.apache.logging.log4j.Logger;
|
|
|
|
|
|
|
|
public class ModInit implements ModInitializer {
|
|
|
|
public static final String MOD_NAME = "translater";
|
|
|
|
public static final String MOD_ID = "translater";
|
2020-07-10 20:46:39 +02:00
|
|
|
public static Cfg cfg;
|
|
|
|
public ModInit() {
|
|
|
|
AutoConfig.register(Cfg.class, JanksonConfigSerializer::new);
|
|
|
|
cfg = AutoConfig.getConfigHolder(Cfg.class).getConfig();
|
|
|
|
}
|
2020-07-10 15:51:27 +02:00
|
|
|
|
|
|
|
private static final Logger logger = LogManager.getFormatterLogger(MOD_ID);
|
|
|
|
@Override
|
|
|
|
public void onInitialize() {
|
|
|
|
Log("Loaded translater");
|
|
|
|
}
|
|
|
|
|
|
|
|
public static void Log(String msg) {
|
|
|
|
logger.log(Level.INFO, "[" + MOD_NAME + "]" + msg);
|
|
|
|
}
|
|
|
|
|
|
|
|
public static void Warn(String msg) {
|
|
|
|
logger.log(Level.WARN, "[" + MOD_NAME + "]" + msg);
|
|
|
|
}
|
|
|
|
|
|
|
|
public static void LogDebug(String msg) {
|
|
|
|
logger.log(Level.DEBUG, "[" + MOD_NAME + "]" + msg);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|