Sync with L2jServer HighFive Apr 1st 2015.

This commit is contained in:
MobiusDev
2015-04-02 04:12:06 +00:00
parent 8300183361
commit 1abccfcae0
26 changed files with 283 additions and 248 deletions

View File

@ -48,15 +48,18 @@ public class FaenorScriptEngine extends ScriptEngine
{
final File packDirectory = new File(Config.DATAPACK_ROOT, PACKAGE_DIRECTORY);
final File[] files = packDirectory.listFiles(new XMLFilter());
for (File file : files)
if (files != null)
{
try (InputStream in = new FileInputStream(file))
for (File file : files)
{
parseScript(new ScriptDocument(file.getName(), in), null);
}
catch (IOException e)
{
_log.log(Level.WARNING, e.getMessage(), e);
try (InputStream in = new FileInputStream(file))
{
parseScript(new ScriptDocument(file.getName(), in), null);
}
catch (IOException e)
{
_log.log(Level.WARNING, e.getMessage(), e);
}
}
}
}