fix issue with item not being properly removed

This commit is contained in:
Ryder Belserion 2024-10-31 11:58:15 -04:00
parent a6d2169103
commit 8e25e427ae
No known key found for this signature in database

View File

@ -103,11 +103,11 @@ public class UserManager {
if (!isNuked || !this.auctions.containsKey(uuid)) return; // only remove from the cache, if the data file removal was successful!
final List<AuctionItem> auctions = this.auctions.get(auction.getUuid());
final List<AuctionItem> auctions = this.auctions.get(uuid);
auctions.remove(auction);
this.auctions.put(auction.getUuid(), auctions);
this.auctions.put(uuid, auctions);
}
public void removeActiveItems(final Player player) {
@ -207,9 +207,9 @@ public class UserManager {
section.set("full_time", auction.getFullExpire());
section.set("price", auction.getPrice());
data.set("active_auctions." + uuid+ "." + auction.getId(), null);
// data.set("active_auctions." + uuid + "." + auction.getId(), null);
if (!data.contains("active_auctions." + uuid + "." + auction.getId())) {
if (data.contains("active_auctions." + uuid + "." + auction.getId())) {
removeAuctionItem(auction);
}