mirror of
https://gitlab.com/SamB440/rpgregions-2.git
synced 2026-01-04 15:31:38 +00:00
Create accounts folder, warn if unable to
This commit is contained in:
@@ -24,6 +24,16 @@ public class YamlStorage implements StorageManager {
|
||||
|
||||
private ConcurrentMap<UUID, RPGRegionsAccount> cachedAccounts = new ConcurrentHashMap<>();
|
||||
|
||||
public YamlStorage() {
|
||||
RPGRegions plugin = JavaPlugin.getPlugin(RPGRegions.class);
|
||||
File dataFile = new File(plugin.getDataFolder() + "/accounts/");
|
||||
if (!dataFile.exists()) {
|
||||
if (!dataFile.mkdirs()) {
|
||||
plugin.getLogger().warning("Could not create " + plugin.getDataFolder() + "/accounts/ folder!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<RPGRegionsAccount> getAccount(UUID uuid) {
|
||||
CompletableFuture<RPGRegionsAccount> future = new CompletableFuture<>();
|
||||
|
||||
Reference in New Issue
Block a user