Fix NPE during reload when deleted warps directory (#5353)
This commit is contained in:
parent
1a4f63915f
commit
2f9659e7fc
|
@ -121,7 +121,7 @@ public class Warps implements IConf, net.ess3.api.IWarps {
|
|||
public final void reloadConfig() {
|
||||
warpPoints.clear();
|
||||
final File[] listOfFiles = warpsFolder.listFiles();
|
||||
if (listOfFiles.length >= 1) {
|
||||
if (listOfFiles != null) {
|
||||
for (final File listOfFile : listOfFiles) {
|
||||
final String filename = listOfFile.getName();
|
||||
if (listOfFile.isFile() && filename.endsWith(".yml")) {
|
||||
|
|
Loading…
Reference in New Issue