package me.deftware.client.framework.main;

import com.google.gson.JsonObject;
import me.deftware.client.framework.utils.Settings;

/**
 * This is a parent class for all of the mods loaded by EMC.
 * Your mod must extend this class
 */
public abstract class EMCMod {

	private Settings settings;
	public JsonObject modInfo;

	protected void init(JsonObject json) {
		modInfo = json;
		settings = new Settings();
		settings.initialize(json);
		initialize();
	}

	/**
	 * Called before any events are sent to your mod, do your initialization here
	 */
	public abstract void initialize();

	/**
	 * Called when EMC has tried to connect to the marketplace API, both successfully and unsuccessfully
	 *
	 * @param status Whether or not EMC has a successful connection with the EMC mod marketplace
	 */
	public void onMarketplaceAuth(boolean status) { }

	/**
	 * Unloads your mod from EMC
	 */
	protected void disable() {
		Bootstrap.getMods().remove(modInfo.get("name").getAsString());
	}

	/**
	 * Returns your main EMC mod settings handler
	 *
	 * @return Settings
	 */
	public Settings getSettings() {
		return settings;
	}

	/**
	 * Called when Minecraft is closed, use this method to save anything in your mod
	 */
	public void onUnload() {
	}

	/**
	 * By implementing this function you can call functions in other EMC mods
	 *
	 * @param method The method the caller wants to call
	 * @param caller The EMC mod that is calling your function
	 */
	public void callMethod(String method, String caller) {
	}

	public void postInit() {
	}

}

@@ -584,270 +584,8 @@
 );%0A%0A
-%09/**%0A%09 * Called when EMC has tried to connect to the marketplace API, both successfully and unsuccessfully%0A%09 *%0A%09 * @param status Whether or not EMC has a successful connection with the EMC mod marketplace%0A%09 */%0A%09public void onMarketplaceAuth(boolean status) %7B %7D%0A%0A
 %09/**
@@ -972,18 +972,17 @@
 load() %7B
-%0A%09
+ 
 %7D%0A%0A%09/**%0A
@@ -1234,18 +1234,17 @@
 aller) %7B
-%0A%09
+ 
 %7D%0A%0A%09publ
@@ -1263,15 +1263,14 @@
 Init() %7B
-%0A%09
+ 
 %7D%0A%0A%7D%0A

Remove onMarketplaceAuth method