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);
|
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
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren