From 3c85dfb9fbcb720960fe7bc7319846b42fa8de04 Mon Sep 17 00:00:00 2001 From: Josiah Glosson Date: Fri, 12 Jul 2024 08:01:55 -0500 Subject: [PATCH] Add WorldHostPlugin.init --- src/main/java/io/github/gaming32/worldhost/WorldHost.java | 4 ++++ .../io/github/gaming32/worldhost/plugin/WorldHostPlugin.java | 3 +++ src/main/resources/world-host.mixins.json | 4 ++-- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/main/java/io/github/gaming32/worldhost/WorldHost.java b/src/main/java/io/github/gaming32/worldhost/WorldHost.java index f9cde196..258869e4 100644 --- a/src/main/java/io/github/gaming32/worldhost/WorldHost.java +++ b/src/main/java/io/github/gaming32/worldhost/WorldHost.java @@ -299,6 +299,10 @@ private static void init(IOFunction assetGetter) { .collect(Collectors.joining(", ")) ); + for (final LoadedWorldHostPlugin plugin : plugins) { + plugin.plugin().init(); + } + if (CONFIG.isUPnP()) { scanUpnp(); } diff --git a/src/main/java/io/github/gaming32/worldhost/plugin/WorldHostPlugin.java b/src/main/java/io/github/gaming32/worldhost/plugin/WorldHostPlugin.java index be20487c..2a16ef66 100644 --- a/src/main/java/io/github/gaming32/worldhost/plugin/WorldHostPlugin.java +++ b/src/main/java/io/github/gaming32/worldhost/plugin/WorldHostPlugin.java @@ -19,6 +19,9 @@ default int priority() { return 0; } + default void init() { + } + default List getInfoTexts(InfoTextsCategory category) { return List.of(); } diff --git a/src/main/resources/world-host.mixins.json b/src/main/resources/world-host.mixins.json index daf9a68a..6f5b4e36 100644 --- a/src/main/resources/world-host.mixins.json +++ b/src/main/resources/world-host.mixins.json @@ -1,8 +1,8 @@ { "required": true, - "minVersion": "0.7", + "minVersion": "0.8", "package": "io.github.gaming32.worldhost.mixin", - "compatibilityLevel": "JAVA_16", + "compatibilityLevel": "JAVA_17", "mixins": [ "MixinCommands", "MixinConnection",