Adds default constructor to SpawnerStackImpl, fix async saving issues on shutdown

This commit is contained in:
ceze88 2023-06-29 16:05:13 +02:00
parent abd41fc602
commit 098c819b1c
2 changed files with 6 additions and 2 deletions

View File

@ -114,8 +114,9 @@ public class UltimateStacker extends SongodaPlugin {
public void onPluginDisable() {
this.stackingTask.stop();
this.stackingTask = null;
this.dataManager.saveBatch(this.spawnerStackManager.getStacksData());
this.dataManager.saveBatch(this.blockStackManager.getStacksData());
this.dataManager.saveBatchSync(this.spawnerStackManager.getStacksData());
this.dataManager.saveBatchSync(this.blockStackManager.getStacksData());
this.dataManager.shutdownNow();
HologramManager.removeAllHolograms();
Async.shutdown();
}

View File

@ -32,6 +32,9 @@ public class SpawnerStackImpl implements SpawnerStack {
private SSpawner sSpawner;
public SpawnerStackImpl() {
}
public SpawnerStackImpl(Location location, int amount) {
this.location = location;
this.amount = amount;