Interface IPlayerQuickBuyCache


public interface IPlayerQuickBuyCache
Represents a cache for the quick buy settings of a player.
  • Method Details

    • getQuickBuyCache

      IPlayerQuickBuyCache getQuickBuyCache(UUID uuid)
      Get the quick buy cache for a player with the specified UUID.
      Parameters:
      uuid - The UUID of the player.
      Returns:
      The cached player quick buy instance.
    • getElements

      List<IQuickBuyElement> getElements()
      Get the elements in the quick buy cache.
      Returns:
      A list of quick buy elements.
    • destroy

      void destroy()
      Destroy the quick buy cache, clearing all elements and performing necessary clean-up.
    • setElement

      void setElement(int slot, ICategoryContent cc)
      Set the category content for a specific slot in the quick buy cache.
      Parameters:
      slot - The slot to set the category content for.
      cc - The category content to set.
    • setElement

      void setElement(int slot, String category)
      Set the category content for a specific slot in the quick buy cache.
      Parameters:
      slot - The slot to set the category content for.
      category - The category to set.
    • addQuickElement

      void addQuickElement(IQuickBuyElement e)
      Add a quick buy element to the cache.
      Parameters:
      e - The quick buy element to add.
    • hasCategoryContent

      boolean hasCategoryContent(ICategoryContent cc)
      Check if the quick buy cache has a specific category content.
      Parameters:
      cc - The category content to check.
      Returns:
      true if the category content is present in the cache, false otherwise.
    • addInInventory

      void addInInventory(org.bukkit.inventory.Inventory inv, IShopCache shopCache)
      Add the player's quick buy preferences to the specified inventory.
      Parameters:
      inv - The inventory to add the preferences to.
      shopCache - The shop cache to retrieve item stacks from.
    • pushChangesToDB

      void pushChangesToDB()
      Save the QuickBuyCache to the database.