mirror of
https://github.com/exituser/Brewery.git
synced 2026-09-17 06:38:56 +00:00
Created Async MySQL Saver
This commit is contained in:
@@ -23,6 +23,7 @@ import org.bukkit.configuration.file.FileConfiguration;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
import java.sql.SQLException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -151,6 +152,14 @@ public class P extends JavaPlugin {
|
||||
// save Data to Disk
|
||||
DataSave.save(true);
|
||||
|
||||
if (BConfig.sqlSync != null) {
|
||||
try {
|
||||
BConfig.sqlSync.closeConnection();
|
||||
} catch (SQLException ignored) {
|
||||
}
|
||||
BConfig.sqlSync = null;
|
||||
}
|
||||
|
||||
// delete config data, in case this is a reload and to clear up some ram
|
||||
clearConfigData();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user