Fix NPE on file load

This commit is contained in:
Acrobot 2013-04-05 13:11:06 +02:00
parent a02593bd4c
commit e0fbe9f31a

View File

@ -126,7 +126,10 @@ public class ChestShop extends JavaPlugin {
private static File loadFile(File file) {
if (!file.exists()) {
try {
if (file.getParent() != null) {
file.getParentFile().mkdirs();
}
file.createNewFile();
} catch (IOException e) {
e.printStackTrace();