mirror of
https://gitlab.com/SamB440/rpgregions-2.git
synced 2025-12-29 11:49:08 +00:00
Revert "Fix server freeze by running config save async (YamlStorage)"
Caused the JVM to crash. This was unsafe. It's better to just let the server freeze (likely due to slow file system), and tell people to use SQLite instead.
This reverts commit bb58da00
This commit is contained in:
@@ -5,7 +5,6 @@ import net.islandearth.rpgregions.managers.data.IStorageManager;
|
||||
import net.islandearth.rpgregions.managers.data.account.RPGRegionsAccount;
|
||||
import net.islandearth.rpgregions.managers.data.region.Discovery;
|
||||
import net.islandearth.rpgregions.managers.data.region.WorldDiscovery;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.configuration.file.FileConfiguration;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
|
||||
@@ -146,13 +145,11 @@ public class YamlStorage implements IStorageManager {
|
||||
}
|
||||
|
||||
config.set("Discoveries", newData);
|
||||
Bukkit.getScheduler().runTaskAsynchronously(plugin, () -> {
|
||||
try {
|
||||
config.save(file);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
});
|
||||
try {
|
||||
config.save(file);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
cachedAccounts.remove(uuid);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user