mirror of
https://github.com/GTNewHorizons/ModTweaker.git
synced 2026-11-16 01:55:11 +00:00
Smeltery fix and various others
This commit is contained in:
1 parent
570e4f8607
commit
25feee0162
101 files changed
+2292
-1019
No files matched your search
@@ -0,0 +1,24 @@
|
||||
package modtweaker2.utils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import cpw.mods.fml.common.Loader;
|
||||
|
||||
public class TweakerPlugin {
|
||||
private static ArrayList<String> isLoaded = new ArrayList();
|
||||
|
||||
public static void register(String mod, Class clazz) {
|
||||
if (Loader.isModLoaded(mod)) {
|
||||
try {
|
||||
clazz.newInstance();
|
||||
isLoaded.add(mod);
|
||||
} catch (Exception e) {
|
||||
isLoaded.remove(mod);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean isLoaded(String string) {
|
||||
return isLoaded.contains(string);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user