mirror of
https://github.com/songoda/FabledSkyBlock.git
synced 2024-11-27 12:45:25 +01:00
Fix async access to file
This commit is contained in:
parent
b21c33538b
commit
70e561c54f
@ -132,7 +132,7 @@ public final class UserCacheManager {
|
|||||||
Bukkit.getServer().getScheduler().runTaskAsynchronously(skyblock, () -> save());
|
Bukkit.getServer().getScheduler().runTaskAsynchronously(skyblock, () -> save());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void save() {
|
public synchronized void save() {
|
||||||
try {
|
try {
|
||||||
config.getFileConfiguration().save(config.getFile());
|
config.getFileConfiguration().save(config.getFile());
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user