mirror of
https://gitlab.com/SamB440/rpgregions-2.git
synced 2026-01-04 15:31:38 +00:00
Fix various potential memory leak and concurrency issues with acccount storage
This commit is contained in:
@@ -42,11 +42,17 @@ public interface IStorageManager {
|
||||
void clearDiscovery(UUID uuid, String regionId);
|
||||
|
||||
void deleteAccount(UUID uuid);
|
||||
|
||||
/**
|
||||
* Removes an account from the storage cache and saves its data.
|
||||
* Removes an account from the storage cache and optionally saves its data.
|
||||
* @param uuid player's UUID
|
||||
* @param save whether to save the player's data
|
||||
*/
|
||||
CompletableFuture<Void> removeCachedAccount(UUID uuid);
|
||||
CompletableFuture<Void> removeCachedAccount(UUID uuid, boolean save);
|
||||
|
||||
default CompletableFuture<Void> removeCachedAccount(UUID uuid) {
|
||||
return removeCachedAccount(uuid, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a UUID safe to use in databases.
|
||||
|
||||
Reference in New Issue
Block a user