From b394c7ef0c3c2b1a97f7726a2d3c3aa4c1c175b0 Mon Sep 17 00:00:00 2001 From: ineanto Date: Sat, 23 Dec 2023 00:02:49 +0100 Subject: [PATCH] refactor(build): expand to all yml (1.1.0-RC1) --- build.gradle.kts | 5 +---- src/main/java/xyz/ineanto/nicko/i18n/CustomLocale.java | 6 ++---- src/main/resources/config.yml | 2 +- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 1f1ba0f..b9bf803 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -71,10 +71,7 @@ tasks { processResources { from("src/main/resources") duplicatesStrategy = DuplicatesStrategy.EXCLUDE - filesMatching("config.yml") { - expand("version" to version) - } - filesMatching("plugin.yml") { + filesMatching("*.yml") { expand("version" to version) } } diff --git a/src/main/java/xyz/ineanto/nicko/i18n/CustomLocale.java b/src/main/java/xyz/ineanto/nicko/i18n/CustomLocale.java index f172d27..b1e429e 100644 --- a/src/main/java/xyz/ineanto/nicko/i18n/CustomLocale.java +++ b/src/main/java/xyz/ineanto/nicko/i18n/CustomLocale.java @@ -37,10 +37,8 @@ public class CustomLocale { final String localeFileName = locale.getCode() + ".yml"; try { final InputStream resource = NickoBukkit.getInstance().getResource(localeFileName); - if (resource != null) { - Files.copy(resource, file.toPath()); - resource.close(); - } + Files.copy(resource, file.toPath()); + resource.close(); } catch (IOException e) { logger.severe("Unable to dump Locale: " + locale.getCode() + "!"); } diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 92219c5..e554244 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -1,6 +1,6 @@ # Nicko ${version} - Config: -# Specifies the configuration version. (Don't change!) +# Specifies the configuration version, don't change. version: "1.0.8" ############