mirror of
https://github.com/Crazy-Crew/CrazyAuctions.git
synced 2024-11-21 11:45:11 +01:00
update auction caches on start/reload
This commit is contained in:
parent
52f3ee62b9
commit
d205cdb500
@ -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();
|
||||
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user