Add a warning message when trying to correct invalid configuration.
Dieser Commit ist enthalten in:
Ursprung
dc186df695
Commit
d4d763af94
@ -101,8 +101,11 @@ public class ProtocolLibrary extends JavaPlugin {
|
||||
detailedReporter.reportWarning(this, "Cannot load configuration", e);
|
||||
|
||||
// Load it again
|
||||
deleteConfig();
|
||||
config = new ProtocolConfig(this);
|
||||
if (deleteConfig()) {
|
||||
config = new ProtocolConfig(this);
|
||||
} else {
|
||||
reporter.reportWarning(this, "Cannot delete old ProtocolLib configuration.");
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
@ -123,8 +126,8 @@ public class ProtocolLibrary extends JavaPlugin {
|
||||
}
|
||||
}
|
||||
|
||||
private void deleteConfig() {
|
||||
config.getFile().delete();
|
||||
private boolean deleteConfig() {
|
||||
return config.getFile().delete();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren