Closed MorningMC closed 9 hours ago
建议:
public static void DeleteMod(ModObj mod)
{
try {
string name = new FileInfo(mod.Local).Name;
foreach (var item in mod.Game.Mods)
{
if (item.Value.File == name)
{
mod.Game.Mods.Remove(item.Key);
mod.Game.SaveModInfo();
break;
}
}
mod.Delete();
} catch (Exception e) {
// do sth like showing a dialog
}
}
本人不会C#,我是按Java写的
崩溃日志:
修复建议:加一个catch