mirror of
https://github.com/JamesPeters98/ChestsPlusPlus.git
synced 2024-11-22 02:25:58 +01:00
Possible fix for saving issues (#76)
* 1.18.2 support * 2.6.2-Beta * Update NMSProviderDefault.java * Update build-1.18+.sh * Update BuildTools/build-1.18+.sh * Fix saving issues Co-authored-by: James Peters <jameslfc19@gmail.com>
This commit is contained in:
parent
9da0fe0dba
commit
4512115fc1
@ -14,7 +14,7 @@ public class Permissions {
|
||||
public static final String AUTOCRAFT_OPEN_REMOTE = "chestlink.autocraft.remote-open";
|
||||
public static final String AUTOCRAFT_ADD = "chestlink.autocraft.add";
|
||||
public static final String AUTOCRAFT_REMOVE = "chestlink.autocraft.remove";
|
||||
public static final String PARTY_CREATE = "chestslink.party.create";
|
||||
public static final String PARTY_CREATE = "chestlink.party.create";
|
||||
public static final String PARTY_INVITE = "chestlink.party.invite";
|
||||
public static final String PARTY_ACCEPT_INVITE = "chestlink.party.accept_invite";
|
||||
}
|
||||
|
@ -19,11 +19,14 @@ import java.nio.file.Paths;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.ThreadPoolExecutor;
|
||||
|
||||
public class Config {
|
||||
|
||||
private static ConfigStorage store;
|
||||
private static FileConfiguration config;
|
||||
private static ThreadPoolExecutor executor;
|
||||
|
||||
private static final String saveName = "/data/storage.yml";
|
||||
|
||||
@ -34,6 +37,7 @@ public class Config {
|
||||
private static List<StorageType<? extends AbstractStorage>> storageTypes;
|
||||
|
||||
public Config() {
|
||||
executor = (ThreadPoolExecutor) Executors.newFixedThreadPool(1);
|
||||
legacyConverter();
|
||||
configConverter();
|
||||
|
||||
@ -71,7 +75,7 @@ public class Config {
|
||||
}
|
||||
|
||||
public static void saveASync() {
|
||||
Bukkit.getScheduler().runTaskAsynchronously(ChestsPlusPlus.PLUGIN, Config::save);
|
||||
executor.execute(Config::save);
|
||||
}
|
||||
|
||||
public static AutoCraftingStorageType getAutoCraft() {
|
||||
|
Loading…
Reference in New Issue
Block a user