Skip to content

Commit

Permalink
Add WorldHostPlugin.init
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaming32 committed Jul 12, 2024
1 parent 6e4849c commit 3c85dfb
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/main/java/io/github/gaming32/worldhost/WorldHost.java
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,10 @@ private static void init(IOFunction<String, Path> assetGetter) {
.collect(Collectors.joining(", "))
);

for (final LoadedWorldHostPlugin plugin : plugins) {
plugin.plugin().init();
}

if (CONFIG.isUPnP()) {
scanUpnp();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ default int priority() {
return 0;
}

default void init() {
}

default List<Component> getInfoTexts(InfoTextsCategory category) {
return List.of();
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/world-host.mixins.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit 3c85dfb

Please sign in to comment.