fix: fix cn.wzpmc.plugins.JavaPlugin::saveDefaultConfig method overwrite the configuration file bug
This commit is contained in:
parent
dc1f35ca0d
commit
6526af0437
@ -98,9 +98,11 @@ public abstract class JavaPlugin implements BasePlugin {
|
||||
return;
|
||||
}
|
||||
File defaultConfigFile = this.getDefaultConfigFile();
|
||||
if (!defaultConfigFile.exists()) {
|
||||
try (FileOutputStream fileOutputStream = new FileOutputStream(defaultConfigFile)) {
|
||||
resourceAsStream.transferTo(fileOutputStream);
|
||||
}
|
||||
}
|
||||
} catch (IOException e) {
|
||||
log.error(e);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user