mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-11-22 08:47:39 +00:00
Fix game-related data not saving
This commit is contained in:
parent
31a02050cf
commit
bef455d50c
@ -1,7 +1,5 @@
|
||||
package emu.grasscutter.database;
|
||||
|
||||
import static com.mongodb.client.model.Filters.eq;
|
||||
|
||||
import dev.morphia.query.FindOptions;
|
||||
import dev.morphia.query.Sort;
|
||||
import dev.morphia.query.experimental.filters.Filters;
|
||||
@ -23,10 +21,13 @@ import emu.grasscutter.game.quest.GameMainQuest;
|
||||
import emu.grasscutter.game.world.SceneGroupInstance;
|
||||
import emu.grasscutter.utils.objects.Returnable;
|
||||
import io.netty.util.concurrent.FastThreadLocalThread;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.concurrent.*;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import static com.mongodb.client.model.Filters.eq;
|
||||
|
||||
public final class DatabaseHelper {
|
||||
private static final ExecutorService eventExecutor =
|
||||
new ThreadPoolExecutor(
|
||||
@ -53,7 +54,7 @@ public final class DatabaseHelper {
|
||||
* @param object The object to save.
|
||||
*/
|
||||
public static void saveGameAsync(Object object) {
|
||||
DatabaseHelper.eventExecutor.submit(() -> DatabaseHelper.saveGameAsync(object));
|
||||
DatabaseHelper.eventExecutor.submit(() -> DatabaseManager.getGameDatastore().save(object));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user