This repository was archived by the owner on Feb 16, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +17
-15
lines changed
src/main/kotlin/com/github/syari/spigot/api/config Expand file tree Collapse file tree 3 files changed +17
-15
lines changed Original file line number Diff line number Diff line change @@ -177,7 +177,7 @@ repositories {
177
177
}
178
178
179
179
dependencies {
180
- api('com.github.sya-ri:EasySpigotAPI:1.3.1 ') {
180
+ api('com.github.sya-ri:EasySpigotAPI:1.3.2 ') {
181
181
exclude group: 'org.spigotmc', module: 'spigot-api'
182
182
}
183
183
}
@@ -191,7 +191,7 @@ repositories {
191
191
}
192
192
193
193
dependencies {
194
- api(" com.github.sya-ri:EasySpigotAPI:1.3.1 " ) {
194
+ api(" com.github.sya-ri:EasySpigotAPI:1.3.2 " ) {
195
195
exclude(group = " org.spigotmc" , module = " spigot-api" )
196
196
}
197
197
}
@@ -217,7 +217,7 @@ configurations {
217
217
}
218
218
219
219
dependencies {
220
- shadowApi('com.github.sya-ri:EasySpigotAPI:1.3.1 ') {
220
+ shadowApi('com.github.sya-ri:EasySpigotAPI:1.3.2 ') {
221
221
exclude group: 'org.spigotmc', module: 'spigot-api'
222
222
}
223
223
}
@@ -242,7 +242,7 @@ repositories {
242
242
}
243
243
244
244
dependencies {
245
- shadowApi(" com.github.sya-ri:EasySpigotAPI:1.3.1 " ) {
245
+ shadowApi(" com.github.sya-ri:EasySpigotAPI:1.3.2 " ) {
246
246
exclude(group = " org.spigotmc" , module = " spigot-api" )
247
247
}
248
248
}
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ repositories {
11
11
}
12
12
13
13
group = " com.github.sya-ri.spigot.api"
14
- version = " 1.3.1 "
14
+ version = " 1.3.2 "
15
15
16
16
bukkit {
17
17
name = " EasySpigotAPI"
Original file line number Diff line number Diff line change @@ -33,19 +33,21 @@ class CustomConfig internal constructor(
33
33
val config: YamlConfiguration
34
34
35
35
init {
36
- try {
37
- file.parentFile.mkdirs()
38
- file.createNewFile()
39
- if (default.isNotEmpty()) {
40
- default.forEach { (key, value) ->
41
- setUnsafe(key, value)
42
- }
43
- save()
36
+ if (file.exists().not ()) {
37
+ try {
38
+ file.parentFile.mkdirs()
39
+ file.createNewFile()
40
+ } catch (ex: IOException ) {
41
+ throw IOException (" $filePath の作成に失敗しました" )
44
42
}
45
- } catch (ex: IOException ) {
46
- plugin.logger.severe(" $filePath の作成に失敗しました" )
47
43
}
48
44
config = YamlConfiguration .loadConfiguration(file)
45
+ if (default.isNotEmpty()) {
46
+ default.forEach { (key, value) ->
47
+ setUnsafe(key, value)
48
+ }
49
+ save()
50
+ }
49
51
}
50
52
51
53
/* *
You can’t perform that action at this time.
0 commit comments