1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-20 03:35:51 +00:00

Merge pull request #1282 from SoSeDiK/mf

Fixes #1281
This commit is contained in:
TheBusyBiscuit 2019-12-04 18:20:46 +01:00 committed by GitHub
commit 95e70e5838
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(); Config cfg = entry.getValue();
if (cfg.getKeys().isEmpty()) { if (cfg.getKeys().isEmpty()) {
if (!cfg.getFile().delete()) { File file = cfg.getFile();
Slimefun.getLogger().log(Level.WARNING, "Could not delete File: " + cfg.getFile().getName()); if (file.exists() && !file.delete()) {
Slimefun.getLogger().log(Level.WARNING, "Could not delete File: " + file.getName());
} }
} }
else { else {