mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2024-11-24 02:56:02 +01:00
Fix NPE on file load
This commit is contained in:
parent
a02593bd4c
commit
e0fbe9f31a
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user