1
0
mirror of https://github.com/lucko/LuckPerms.git synced 2025-08-22 06:02:49 +02:00

Move config load earlier in startup process (#4083)

This commit is contained in:
Luck
2025-06-14 09:31:56 +01:00
parent bac0edd90e
commit 51fe574a51

View File

@@ -132,6 +132,16 @@ public abstract class AbstractLuckPermsPlugin implements LuckPermsPlugin {
// load some utilities early
this.permissionRegistry = new AsyncPermissionRegistry(getBootstrap().getScheduler());
this.verboseHandler = new VerboseHandler(getBootstrap().getScheduler());
// load configuration
getLogger().info("Loading configuration...");
ConfigurationAdapter configFileAdapter = provideConfigurationAdapter();
this.configuration = new LuckPermsConfiguration(this, new MultiConfigurationAdapter(this,
new FileSecretConfigAdapter(this),
new SystemPropertyConfigAdapter(this),
new EnvironmentVariableConfigAdapter(this),
configFileAdapter
));
}
public final void enable() {
@@ -144,16 +154,6 @@ public abstract class AbstractLuckPermsPlugin implements LuckPermsPlugin {
// setup log dispatcher instance early
this.logDispatcher = new LogDispatcher(this);
// load configuration
getLogger().info("Loading configuration...");
ConfigurationAdapter configFileAdapter = provideConfigurationAdapter();
this.configuration = new LuckPermsConfiguration(this, new MultiConfigurationAdapter(this,
new FileSecretConfigAdapter(this),
new SystemPropertyConfigAdapter(this),
new EnvironmentVariableConfigAdapter(this),
configFileAdapter
));
// setup a bytebin instance
this.httpClient = new OkHttpClient.Builder()
.callTimeout(15, TimeUnit.SECONDS)