Compare commits

...

2 Commits

Author SHA1 Message Date
7c44209d07
chore: update dependencies
All checks were successful
ci/woodpecker/push/jfmod Pipeline was successful
2024-04-05 15:35:05 +02:00
3c31d78ab8
fix: catch exceptions during translation service initialization 2024-04-05 15:34:51 +02:00
2 changed files with 7 additions and 5 deletions

View File

@ -5,12 +5,12 @@ plugins {
allprojects { group = "io.gitlab.jfronny" }
base.archivesName = "google-chat"
val fabricVersion = "0.91.1+1.20.4"
val fabricVersion = "0.96.11+1.20.4"
jfMod {
minecraftVersion = "1.20.4"
yarn("build.1")
loaderVersion = "0.15.0"
libJfVersion = "3.14.1"
yarn("build.3")
loaderVersion = "0.15.9"
libJfVersion = "3.14.3"
modrinth {
projectId = "google-chat"

View File

@ -2,6 +2,8 @@ package io.gitlab.jfronny.googlechat;
import io.gitlab.jfronny.commons.io.cache.FixedSizeMap;
import io.gitlab.jfronny.commons.logging.Logger;
import io.gitlab.jfronny.commons.throwable.Coerce;
import io.gitlab.jfronny.commons.throwable.Try;
import io.gitlab.jfronny.libjf.translate.api.Language;
import io.gitlab.jfronny.libjf.translate.api.TranslateService;
import net.fabricmc.api.EnvType;
@ -30,7 +32,7 @@ public class GoogleChat implements ModInitializer {
@Override
public void onInitialize() {
ForkJoinPool.commonPool().execute(() -> TRANSLATE_SERVICE = TranslateService.getConfigured());
ForkJoinPool.commonPool().execute(Try.handle(Coerce.runnable(() -> TRANSLATE_SERVICE = TranslateService.getConfigured()), e -> LOGGER.error("Could not initialize translation service", e)));
}
public static void onConfigChange() {