Fixed: NullPointerException

This commit is contained in:
Reider745
2025-05-14 10:04:48 +03:00
parent 0db0b06574
commit df95223e93
2 changed files with 5 additions and 3 deletions
@@ -352,7 +352,7 @@ public class InnerCoreServer {
BehaviorPack pack = new BehaviorPack(file.getAbsolutePath());
pack.load();
}catch (Exception e) {
Logger.error("Error loaded behavior pack " + file.getAbsolutePath());
Logger.error("Error loaded behavior pack " + file.getAbsolutePath(), e);
}
}
}catch (Exception ignore){}
@@ -83,8 +83,10 @@ public class BehaviorPack {
for(BehaviorContent content : contents_api){
final String pathFolder = this.path + content.getDefaultDirectory();
final String[] files = new File(pathFolder).list();
for(String file : files)
loadFileContext(pathFolder+"/"+file);
if(files != null) {
for (String file : files)
loadFileContext(pathFolder + "/" + file);
}
}
}