diff --git a/Core/src/main/java/fr/altarik/toolbox/core/config/ConfigI.java b/Core/src/main/java/fr/altarik/toolbox/core/config/ConfigI.java index 2d79082..3ca8aba 100644 --- a/Core/src/main/java/fr/altarik/toolbox/core/config/ConfigI.java +++ b/Core/src/main/java/fr/altarik/toolbox/core/config/ConfigI.java @@ -24,10 +24,10 @@ public class ConfigI { return configPath.resolve(name); } - public static ConfigI load(Path configPath, String name, Class clazz) throws IOException, JsonSyntaxException, JsonIOException { + public static T load(Path configPath, String name, Class clazz) throws IOException, JsonSyntaxException, JsonIOException { Path path = getConfigPath(configPath, name); - ConfigI file; + T file; if(Files.exists(path)) { FileReader reader = new FileReader(path.toFile()); @@ -58,6 +58,7 @@ public class ConfigI { Files.writeString(this.configPath, GSON.toJson(this)); // Files.copy(tempPath, this.configPath, StandardCopyOption.REPLACE_EXISTING); // Files.delete(tempPath); + // commented because throws an error on windows each time if the file already exist } } diff --git a/Core/src/main/resources/assets/core/icon.png b/Core/src/main/resources/assets/core/icon.png index 1049a98..662592c 100644 Binary files a/Core/src/main/resources/assets/core/icon.png and b/Core/src/main/resources/assets/core/icon.png differ diff --git a/Core/src/main/resources/fabric.mod.json b/Core/src/main/resources/fabric.mod.json index 9b1c447..befb902 100644 --- a/Core/src/main/resources/fabric.mod.json +++ b/Core/src/main/resources/fabric.mod.json @@ -8,7 +8,7 @@ "Altarik" ], "contributors": [ - "Legot Quentin" + ], "contact": { "homepage": "https://altarik.fr" @@ -25,5 +25,13 @@ "fabric-api": "*", "minecraft": "${minecraftVersion}", "java": ">=17" + }, + "custom": { + "modmenu": { + "badges": [ "library" ], + "parent": { + "parent": "toolbox" + } + } } } diff --git a/Core/src/test/java/BuilderImpl.java b/Core/src/test/java/BuilderImpl.java index a5a8850..fdc1f76 100644 --- a/Core/src/test/java/BuilderImpl.java +++ b/Core/src/test/java/BuilderImpl.java @@ -32,7 +32,7 @@ public class BuilderImpl implements IBuilder { @Override - public BuilderResult build() throws Exception { + public BuilderResult build() { return new BuilderResult(collection.get(), numberOfSentences.get()); } } diff --git a/Core/src/test/java/ConfigITest.java b/Core/src/test/java/ConfigITest.java index c2280d3..6ece3ce 100644 --- a/Core/src/test/java/ConfigITest.java +++ b/Core/src/test/java/ConfigITest.java @@ -14,7 +14,7 @@ public class ConfigITest { public double para3 = 3.14; public static ConfigClazz load() throws IOException { - return (ConfigClazz) load(Path.of("."), "test.json", ConfigClazz.class); + return load(Path.of("."), "test.json", ConfigClazz.class); } } diff --git a/Database/src/main/java/fr/altarik/toolbox/database/AbstractSqlConnection.java b/Database/src/main/java/fr/altarik/toolbox/database/AbstractSqlConnection.java index e2a4c15..44d268a 100644 --- a/Database/src/main/java/fr/altarik/toolbox/database/AbstractSqlConnection.java +++ b/Database/src/main/java/fr/altarik/toolbox/database/AbstractSqlConnection.java @@ -25,13 +25,6 @@ public abstract class AbstractSqlConnection implements SqlConnection { return connection; } - @Override - public void closeConnection() { - try { - close(); - } catch (Exception ignored) {} - } - @Override public void close() throws Exception { if(!connection.isClosed()) { diff --git a/Database/src/main/java/fr/altarik/toolbox/database/SqlConnection.java b/Database/src/main/java/fr/altarik/toolbox/database/SqlConnection.java index a2839d7..438d149 100644 --- a/Database/src/main/java/fr/altarik/toolbox/database/SqlConnection.java +++ b/Database/src/main/java/fr/altarik/toolbox/database/SqlConnection.java @@ -23,10 +23,4 @@ public interface SqlConnection extends AutoCloseable { */ void checkConnection() throws SQLException; - /** - * @deprecated replaced with {@link AutoCloseable#close()} - */ - @Deprecated(forRemoval = true) - void closeConnection(); - } diff --git a/Database/src/main/resources/assets/database/icon.png b/Database/src/main/resources/assets/database/icon.png index 1049a98..662592c 100644 Binary files a/Database/src/main/resources/assets/database/icon.png and b/Database/src/main/resources/assets/database/icon.png differ diff --git a/Database/src/main/resources/fabric.mod.json b/Database/src/main/resources/fabric.mod.json index 3519334..1c905d9 100644 --- a/Database/src/main/resources/fabric.mod.json +++ b/Database/src/main/resources/fabric.mod.json @@ -8,7 +8,7 @@ "Altarik" ], "contributors": [ - "Legot Quentin" + ], "contact": { "homepage": "https://altarik.fr" @@ -26,5 +26,13 @@ "minecraft": "${minecraftVersion}", "java": ">=17", "toolbox-core": "${version}" + }, + "custom": { + "modmenu": { + "badges": [ "library" ], + "parent": { + "parent": "toolbox" + } + } } } diff --git a/Pagination/src/main/resources/assets/pagination/icon.png b/Pagination/src/main/resources/assets/pagination/icon.png index 1049a98..662592c 100644 Binary files a/Pagination/src/main/resources/assets/pagination/icon.png and b/Pagination/src/main/resources/assets/pagination/icon.png differ diff --git a/Pagination/src/main/resources/fabric.mod.json b/Pagination/src/main/resources/fabric.mod.json index 9059bd5..6bed8b7 100644 --- a/Pagination/src/main/resources/fabric.mod.json +++ b/Pagination/src/main/resources/fabric.mod.json @@ -8,7 +8,7 @@ "Altarik" ], "contributors": [ - "Legot Quentin" + ], "contact": { "homepage": "https://altarik.fr" @@ -29,5 +29,13 @@ "fabric-api": "*", "minecraft": "${minecraftVersion}", "java": ">=17" + }, + "custom": { + "modmenu": { + "badges": [ "library" ], + "parent": { + "parent": "toolbox" + } + } } } diff --git a/Tasks/src/main/resources/assets/tasks/icon.png b/Tasks/src/main/resources/assets/tasks/icon.png index 1049a98..662592c 100644 Binary files a/Tasks/src/main/resources/assets/tasks/icon.png and b/Tasks/src/main/resources/assets/tasks/icon.png differ diff --git a/Tasks/src/main/resources/fabric.mod.json b/Tasks/src/main/resources/fabric.mod.json index 588d0e3..4ade6b6 100644 --- a/Tasks/src/main/resources/fabric.mod.json +++ b/Tasks/src/main/resources/fabric.mod.json @@ -8,7 +8,7 @@ "Altarik" ], "contributors": [ - "Legot Quentin" + ], "contact": { "homepage": "https://altarik.fr" diff --git a/buildSrc/gradle.properties b/buildSrc/gradle.properties index 1b7390b..11df63b 100644 --- a/buildSrc/gradle.properties +++ b/buildSrc/gradle.properties @@ -1 +1 @@ -okhttp_version=4.10.0 \ No newline at end of file +okhttp_version=4.12.0 \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index a2d17f2..735d21f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,7 +8,7 @@ loader_version=0.15.6 fabric_version=0.95.4+1.20.4 maven_group=fr.altarik.toolbox -maven_version=4.5.1 +maven_version=5.0.0 git_owner=quentinlegot git_repo=Toolbox \ No newline at end of file diff --git a/src/main/resources/assets/toolbox/icon.png b/src/main/resources/assets/toolbox/icon.png index 1049a98..662592c 100644 Binary files a/src/main/resources/assets/toolbox/icon.png and b/src/main/resources/assets/toolbox/icon.png differ diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 2d873b3..1ca4ede 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -8,7 +8,7 @@ "Altarik" ], "contributors": [ - "Legot Quentin" + ], "contact": { "homepage": "https://altarik.fr" @@ -25,6 +25,11 @@ "toolbox-database": "${version}", "toolbox-pagination": "${version}", "toolbox-task": "${version}" + }, + "custom": { + "modmenu": { + "badges": [ "library" ] } } +}