Skip to content

Commit

Permalink
fix: data saving issue introduced in "redis squishies"
Browse files Browse the repository at this point in the history
  • Loading branch information
ProdPreva1l committed Oct 24, 2024
1 parent 24900c8 commit f78433c
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import info.preva1l.fadah.config.ListHelper;
import info.preva1l.fadah.config.Tuple;
import info.preva1l.fadah.data.DatabaseManager;
import info.preva1l.fadah.data.DatabaseType;
import info.preva1l.fadah.multiserver.Message;
import info.preva1l.fadah.multiserver.Payload;
import info.preva1l.fadah.utils.TaskManager;
Expand Down Expand Up @@ -58,9 +57,7 @@ public void purchase(@NotNull Player buyer) {
.payload(Payload.withUUID(this.getId()))
.build().send(Fadah.getINSTANCE().getBroker());
}
if (Config.i().getDatabase().getType() == DatabaseType.MONGO) {
DatabaseManager.getInstance().delete(Listing.class, this);
}
DatabaseManager.getInstance().delete(Listing.class, this);

// Add to collection box
ItemStack itemStack = this.getItemStack().clone();
Expand Down Expand Up @@ -116,9 +113,7 @@ public boolean cancel(@NotNull Player canceller) {
.payload(Payload.withUUID(this.getId()))
.build().send(Fadah.getINSTANCE().getBroker());
}
if (Config.i().getDatabase().getType() == DatabaseType.MONGO) {
DatabaseManager.getInstance().delete(Listing.class, this);
}
DatabaseManager.getInstance().delete(Listing.class, this);


CollectableItem collectableItem = new CollectableItem(this.getItemStack(), Instant.now().toEpochMilli());
Expand Down

0 comments on commit f78433c

Please sign in to comment.