mirror of
https://github.com/Xiao-MoMi/Custom-Crops.git
synced 2025-12-29 11:59:15 +00:00
add an async option
This commit is contained in:
@@ -146,6 +146,7 @@ public class BukkitConfigManager extends ConfigManager {
|
||||
worldeditSupport = config.getBoolean("other-settings.worldedit-support", false);
|
||||
|
||||
interveneAntiGrief = config.getBoolean("other-settings.intervene-anti-grief", false);
|
||||
asyncWorldSaving = config.getBoolean("other-settings.async-world-saving", true);
|
||||
|
||||
offsets.clear();
|
||||
Section section = config.getSection("mechanics.hologram-offset-correction");
|
||||
|
||||
@@ -232,7 +232,7 @@ public class BukkitWorldManager implements WorldManager, Listener {
|
||||
@EventHandler
|
||||
public void onWorldSave(WorldSaveEvent event) {
|
||||
final World world = event.getWorld();
|
||||
getWorld(world).ifPresent(world1 -> world1.save(true, false));
|
||||
getWorld(world).ifPresent(world1 -> world1.save(ConfigManager.asyncWorldSaving(), false));
|
||||
}
|
||||
|
||||
@EventHandler (priority = EventPriority.HIGH)
|
||||
|
||||
@@ -149,4 +149,6 @@ other-settings:
|
||||
# Sometimes some anti-grief plugins are not supported by custom item plugins, but they are supported by CustomCrops
|
||||
# If you enable this option, CustomCrops will also protect those unsupported anti-grief plugins
|
||||
# Supported plugins can be found on https://github.com/Xiao-MoMi/AntiGriefLib/blob/main/README.md
|
||||
intervene-anti-grief: false
|
||||
intervene-anti-grief: false
|
||||
# Decides whether the process of saving is async
|
||||
async-world-saving: true
|
||||
Reference in New Issue
Block a user