From 4370addd2c459b0d957e1398f7dd710e80e76d2c Mon Sep 17 00:00:00 2001 From: Aldin Date: Mon, 21 Oct 2024 20:31:35 +0200 Subject: [PATCH] fix: add the default task setup back to the initial setup (#1534) ### Motivation After the removal of CloudPerms the initial setup did not contain the default task setup for `Lobby` and `Proxy` anymore because it only relied on the fact that the task provider was initialized before the setup was started. The removal of CloudPerms also removed that early init and thus the setup was not complete anymore. ### Modification Added the task provider as parameter to the setup step of the node. Aerogel is forced to init the provider first and therefore the setup is registered before the actual start of the setup. ### Result The default task setup is back. --- node/src/main/java/eu/cloudnetservice/node/Node.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/node/src/main/java/eu/cloudnetservice/node/Node.java b/node/src/main/java/eu/cloudnetservice/node/Node.java index 4c988beca0..92876a219d 100644 --- a/node/src/main/java/eu/cloudnetservice/node/Node.java +++ b/node/src/main/java/eu/cloudnetservice/node/Node.java @@ -33,6 +33,7 @@ import eu.cloudnetservice.driver.network.netty.NettyUtil; import eu.cloudnetservice.driver.network.rpc.factory.RPCFactory; import eu.cloudnetservice.driver.network.rpc.handler.RPCHandlerRegistry; +import eu.cloudnetservice.driver.provider.ServiceTaskProvider; import eu.cloudnetservice.driver.registry.ServiceRegistry; import eu.cloudnetservice.driver.registry.injection.Service; import eu.cloudnetservice.driver.template.TemplateStorage; @@ -241,7 +242,9 @@ private void initializeDatabaseProvider( @Inject @Order(450) private void executeSetupIfRequired( - @NonNull DefaultInstallation installation + @NonNull DefaultInstallation installation, + // we have to inject the task provider here so that it registers the default task setup when initialized + @NonNull ServiceTaskProvider taskProvider ) { // execute the setup if needed installation.executeFirstStartSetup();