ModLoadObserver.java
1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
package com.mumfrey.liteloader.api;
import java.io.File;
import com.mumfrey.liteloader.LiteMod;
import com.mumfrey.liteloader.core.ModInfo;
import com.mumfrey.liteloader.interfaces.LoadableMod;
/**
* LiteLoader Extensible API - Mod Load Observer
*
* ModLoadObservers receive callbacks when mod loading events are occurring, prior to init and other
* loader-managed processes
*
* @author Adam Mummery-Smith
*/
public interface ModLoadObserver extends Observer
{
/**
* Called immediately after a mod instance is created, throw an exception from this method in
* order to prevent further initialisation
*/
public abstract void onModLoaded(LiteMod mod);
/**
* Called after a mod is instanced and has been successfully added to the active mods list
*
* @param handle Mod handle
*/
public abstract void onPostModLoaded(ModInfo<LoadableMod<?>> handle);
/**
* Called if mod loading fails
*
* @param container
* @param identifier
* @param reason
* @param th
*/
public abstract void onModLoadFailed(LoadableMod<?> container, String identifier, String reason, Throwable th);
/**
* Called before a mod's init() method is called
*
* @param mod
*/
public abstract void onPreInitMod(LiteMod mod);
/**
* Called after a mod's init() method is called
*
* @param mod
*/
public abstract void onPostInitMod(LiteMod mod);
/**
* Called when migrating mod config from version to version
*
* @param mod
* @param newConfigPath
* @param oldConfigPath
*/
public abstract void onMigrateModConfig(LiteMod mod, File newConfigPath, File oldConfigPath);
}