diff --git a/paper/src/main/java/com/badbones69/crazyauctions/CrazyAuctions.java b/paper/src/main/java/com/badbones69/crazyauctions/CrazyAuctions.java index bb8c289..4234449 100644 --- a/paper/src/main/java/com/badbones69/crazyauctions/CrazyAuctions.java +++ b/paper/src/main/java/com/badbones69/crazyauctions/CrazyAuctions.java @@ -22,6 +22,8 @@ import com.ryderbelserion.vital.paper.util.scheduler.FoliaRunnable; import org.bukkit.command.CommandExecutor; import org.bukkit.command.PluginCommand; import org.bukkit.command.TabCompleter; +import org.bukkit.entity.Player; +import org.bukkit.inventory.Inventory; import org.bukkit.plugin.PluginManager; import org.bukkit.plugin.java.JavaPlugin; @@ -54,6 +56,7 @@ public class CrazyAuctions extends Vital { InventoryManager.loadButtons(); this.userManager = new UserManager(); + this.userManager.updateAuctionsCache(); this.crazyManager = new CrazyManager(); diff --git a/paper/src/main/java/com/badbones69/crazyauctions/commands/AuctionCommand.java b/paper/src/main/java/com/badbones69/crazyauctions/commands/AuctionCommand.java index 125c1dc..9c7a496 100644 --- a/paper/src/main/java/com/badbones69/crazyauctions/commands/AuctionCommand.java +++ b/paper/src/main/java/com/badbones69/crazyauctions/commands/AuctionCommand.java @@ -88,6 +88,12 @@ public class AuctionCommand implements CommandExecutor { this.fileManager.reloadFiles().init(); + // update it again! + this.plugin.getUserManager().updateAuctionsCache(); + + //todo() close inventories by tracking viewers, so the cache can be updated than re-open their inventories + //todo() we need to track the specific inventory they opened, and if it's for them or another player + this.crazyManager.load(); InventoryManager.loadButtons();