Fixed #8328
This commit is contained in:
@@ -428,7 +428,7 @@ public class Mods implements Loadable{
|
|||||||
|
|
||||||
// Add local mods
|
// Add local mods
|
||||||
Seq.with(modDirectory.list())
|
Seq.with(modDirectory.list())
|
||||||
.filter(f -> f.extEquals("jar") || f.extEquals("zip") || (f.isDirectory() && (f.child("mod.json").exists() || f.child("mod.hjson").exists())))
|
.filter(f -> f.extEquals("jar") || f.extEquals("zip") || (f.isDirectory() && Structs.contains(metaFiles, meta -> f.child(meta).exists())))
|
||||||
.each(candidates::add);
|
.each(candidates::add);
|
||||||
|
|
||||||
// Add Steam workshop mods
|
// Add Steam workshop mods
|
||||||
@@ -1075,6 +1075,9 @@ public class Mods implements Loadable{
|
|||||||
|
|
||||||
/** @return whether this mod is supported by the game version */
|
/** @return whether this mod is supported by the game version */
|
||||||
public boolean isSupported(){
|
public boolean isSupported(){
|
||||||
|
//no unsupported mods on servers
|
||||||
|
if(headless) return true;
|
||||||
|
|
||||||
if(isOutdated() || isBlacklisted()) return false;
|
if(isOutdated() || isBlacklisted()) return false;
|
||||||
|
|
||||||
return Version.isAtLeast(meta.minGameVersion);
|
return Version.isAtLeast(meta.minGameVersion);
|
||||||
|
|||||||
@@ -265,8 +265,17 @@ public class ServerControl implements ApplicationListener{
|
|||||||
Core.settings.forceSave();
|
Core.settings.forceSave();
|
||||||
}, saveInterval, saveInterval);
|
}, saveInterval, saveInterval);
|
||||||
|
|
||||||
if(!mods.list().isEmpty()){
|
if(!mods.orderedMods().isEmpty()){
|
||||||
info("@ mods loaded.", mods.list().size);
|
info("@ mods loaded.", mods.orderedMods().size);
|
||||||
|
}
|
||||||
|
|
||||||
|
int unsupported = mods.list().count(l -> !l.enabled());
|
||||||
|
|
||||||
|
if(unsupported > 0){
|
||||||
|
Log.err("There were errors loading @ mod(s):", unsupported);
|
||||||
|
for(LoadedMod mod : mods.list().select(l -> !l.enabled())){
|
||||||
|
Log.err("- @ &ly(" + mod.state + ")", mod.meta.name);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
toggleSocket(Config.socketInput.bool());
|
toggleSocket(Config.socketInput.bool());
|
||||||
@@ -459,7 +468,7 @@ public class ServerControl implements ApplicationListener{
|
|||||||
if(!mods.list().isEmpty()){
|
if(!mods.list().isEmpty()){
|
||||||
info("Mods:");
|
info("Mods:");
|
||||||
for(LoadedMod mod : mods.list()){
|
for(LoadedMod mod : mods.list()){
|
||||||
info(" @ &fi@", mod.meta.displayName(), mod.meta.version);
|
info(" @ &fi@ " + (mod.enabled() ? "" : " &lr(" + mod.state + ")"), mod.meta.displayName(), mod.meta.version);
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
info("No mods found.");
|
info("No mods found.");
|
||||||
|
|||||||
Reference in New Issue
Block a user