Skip to content

Commit b13f961

Browse files
committed
setup vault as delayed task on enable
1 parent 05ad424 commit b13f961

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/main/java/pro/cloudnode/smp/bankaccounts/BankAccounts.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,12 @@ public void onEnable() {
145145
} else {
146146
getLogger().log(Level.INFO, "PlaceholderAPI not found. Skipping integration.");
147147
}
148+
149+
150+
if (getInstance().vaultEnabled())
151+
getServer().getScheduler().scheduleSyncDelayedTask(this, () -> {
152+
getInstance().setupVault();
153+
});
148154
}
149155

150156
@Override
@@ -197,8 +203,6 @@ public static void reload() {
197203
getInstance().setupDbSource();
198204
getInstance().initDbWrapper();
199205
createServerAccount();
200-
if (getInstance().vaultEnabled())
201-
getInstance().setupVault();
202206
getInstance().getServer().getScheduler().runTaskAsynchronously(getInstance(), () -> checkForUpdates().ifPresent(latestVersion -> {
203207
getInstance().getLogger().warning("An update is available: " + latestVersion);
204208
getInstance().getLogger().warning("Please update to the latest version to benefit from bug fixes, security patches, new features and support.");

0 commit comments

Comments
 (0)