Skip to content

Commit a1feefb

Browse files
committed
fix: Config initialization
1 parent d3184b8 commit a1feefb

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
### Fixed
44

55
- Compatibility with Minecraft 1.13 - 1.16.5
6+
- FileNotFoundException on config initialization
67

78
## [v0.7] (2022-02-06)
89

mimic-bukkit/src/main/kotlin/config/MimicConfig.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ internal class MimicConfig(
4242

4343
fun reload() {
4444
try {
45+
if (!file.exists()) {
46+
file.parentFile.mkdirs()
47+
file.createNewFile()
48+
}
4549
configuration.load(file)
4650
readConfigValues()
4751
} catch (e: Exception) {

0 commit comments

Comments
 (0)