Skip to content

Commit

Permalink
Add listeners for full setup (mostly useful for Fabric)
Browse files Browse the repository at this point in the history
Signed-off-by: TheSilkMiner <thesilkminer@outlook.com>
  • Loading branch information
TheSilkMiner authored and jaredlll08 committed Feb 27, 2022
1 parent a9d8e7f commit ac3904d
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ public static void handlePlugins(final Stream<Class<? extends ICraftTweakerPlugi
PLUGIN_MANAGER.get().loadPlugins();
}

public static void handleFullSetupEnd() {

PLUGIN_MANAGER.get().broadcastEnd();
}

public static void registerCommands(CommandDispatcher<CommandSourceStack> dispatcher, Commands.CommandSelection environment) {

CTCommands.init(dispatcher, environment);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,6 @@ default void registerBracketParsers(final IBracketParserRegistrationHandler hand

default void manageJavaNativeIntegration(final IJavaNativeIntegrationRegistrationHandler handler) {}

default void registerListeners(final IListenerRegistrationHandler handler) {}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package com.blamejared.crafttweaker.api.plugin;

public interface IListenerRegistrationHandler {

void registerCraftTweakerLoadCompleteListener(final Runnable runnable);

}
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,9 @@ public void loadPlugins() {
throw new UnsupportedOperationException("Not yet implemented");
}

public void broadcastEnd() {

// TODO("")
}

}

0 comments on commit ac3904d

Please sign in to comment.