Integrations init fix
This commit is contained in:
parent
b53d513dec
commit
42feb6d4b8
4 changed files with 32 additions and 4 deletions
|
@ -16,9 +16,6 @@ public class ModIntegrationAPI {
|
|||
*/
|
||||
public static ModIntegration register(ModIntegration integration) {
|
||||
INTEGRATIONS.add(integration);
|
||||
if (integration.modIsInstalled()) {
|
||||
integration.init();
|
||||
}
|
||||
return integration;
|
||||
}
|
||||
|
||||
|
@ -29,4 +26,15 @@ public class ModIntegrationAPI {
|
|||
public static List<ModIntegration> getIntegrations() {
|
||||
return INTEGRATIONS;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize all integrations, only for internal usage.
|
||||
*/
|
||||
public static void registerAll() {
|
||||
INTEGRATIONS.forEach(integration -> {
|
||||
if (integration.modIsInstalled()) {
|
||||
integration.init();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue