stuff
This commit is contained in:
@ -18,7 +18,7 @@ import java.util.concurrent.TimeUnit;
|
||||
@Log4j2
|
||||
public class AccountManager extends Manager {
|
||||
|
||||
private final int SAVE_INTERVAL = 60 * 5; // 5 minutes
|
||||
private final long SAVE_INTERVAL = 5; // in minutes
|
||||
private static final Map<UUID, Account> ACCOUNTS = new HashMap<>();
|
||||
|
||||
public AccountManager() {
|
||||
@ -28,7 +28,7 @@ public class AccountManager extends Manager {
|
||||
|
||||
Bukkit.getAsyncScheduler().runAtFixedRate(Aetheria.INSTANCE, (task) -> {
|
||||
this.saveAccounts();
|
||||
}, SAVE_INTERVAL, SAVE_INTERVAL, TimeUnit.SECONDS);
|
||||
}, SAVE_INTERVAL, SAVE_INTERVAL, TimeUnit.MINUTES);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -99,6 +99,7 @@ public class AccountManager extends Manager {
|
||||
return;
|
||||
}
|
||||
|
||||
this.saveAccounts();
|
||||
this.saveAccounts(); // Save the accounts to disk
|
||||
ACCOUNTS.clear(); // Remove the accounts from the cache
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user