Archiviert
13
0

Add a warning message when trying to correct invalid configuration.

Dieser Commit ist enthalten in:
Kristian S. Stangeland 2012-11-20 06:53:39 +01:00
Ursprung dc186df695
Commit d4d763af94

Datei anzeigen

@ -101,8 +101,11 @@ public class ProtocolLibrary extends JavaPlugin {
detailedReporter.reportWarning(this, "Cannot load configuration", e); detailedReporter.reportWarning(this, "Cannot load configuration", e);
// Load it again // Load it again
deleteConfig(); if (deleteConfig()) {
config = new ProtocolConfig(this); config = new ProtocolConfig(this);
} else {
reporter.reportWarning(this, "Cannot delete old ProtocolLib configuration.");
}
} }
try { try {
@ -123,8 +126,8 @@ public class ProtocolLibrary extends JavaPlugin {
} }
} }
private void deleteConfig() { private boolean deleteConfig() {
config.getFile().delete(); return config.getFile().delete();
} }
@Override @Override