formatting
This commit is contained in:
@@ -460,24 +460,24 @@ public class Mods implements Loadable{
|
|||||||
eachEnabled(mod -> {
|
eachEnabled(mod -> {
|
||||||
if(mod.root.child("scripts").exists()){
|
if(mod.root.child("scripts").exists()){
|
||||||
content.setCurrentMod(mod);
|
content.setCurrentMod(mod);
|
||||||
Fi main = mod.root.child("scripts").child("main.js");
|
Fi main = mod.root.child("scripts").child("main.js");
|
||||||
if(main.exists() && !main.isDirectory()){
|
if(main.exists() && !main.isDirectory()){
|
||||||
try{
|
try{
|
||||||
if(scripts == null){
|
if(scripts == null){
|
||||||
scripts = platform.createScripts();
|
scripts = platform.createScripts();
|
||||||
}
|
}
|
||||||
scripts.run(mod, main);
|
scripts.run(mod, main);
|
||||||
}catch(Throwable e){
|
}catch(Throwable e){
|
||||||
Core.app.post(() -> {
|
Core.app.post(() -> {
|
||||||
Log.err("Error loading main script {0} for mod {1}.", main.name(), mod.meta.name);
|
Log.err("Error loading main script {0} for mod {1}.", main.name(), mod.meta.name);
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
Core.app.post(() -> {
|
Core.app.post(() -> {
|
||||||
Log.err("No main.js found for mod {0}.", mod.meta.name);
|
Log.err("No main.js found for mod {0}.", mod.meta.name);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}finally{
|
}finally{
|
||||||
|
|||||||
Reference in New Issue
Block a user