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:
ceze88 2022-03-23 14:00:13 +01:00 committed by GitHub
parent 9da0fe0dba
commit 4512115fc1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -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";
}

View File

@ -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() {