1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-20 03:35:51 +00:00
This commit is contained in:
SoSeDiK 2019-12-04 17:57:38 +02:00 committed by GitHub
parent ac8d91810b
commit a294e0db1f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -244,8 +244,9 @@ public class BlockStorage {
Config cfg = entry.getValue();
if (cfg.getKeys().isEmpty()) {
if (!cfg.getFile().delete()) {
Slimefun.getLogger().log(Level.WARNING, "Could not delete File: " + cfg.getFile().getName());
File file = cfg.getFile();
if (file.exists() && !file.delete()) {
Slimefun.getLogger().log(Level.WARNING, "Could not delete File: " + file.getName());
}
}
else {