Class VillagerInventory

All Implemented Interfaces:
InventoryClickHandler, Taggable, TagReadable, TagWritable, Viewable

public class VillagerInventory extends Inventory
  • Constructor Details

    • VillagerInventory

      public VillagerInventory(@NotNull @NotNull Component title)
  • Method Details

    • getTrades

      public List<TradeListPacket.Trade> getTrades()
    • addTrade

      public void addTrade(TradeListPacket.Trade trade)
    • removeTrade

      public void removeTrade(int index)
    • getVillagerLevel

      public int getVillagerLevel()
    • setVillagerLevel

      public void setVillagerLevel(int level)
    • getExperience

      public int getExperience()
    • setExperience

      public void setExperience(int experience)
    • isRegularVillager

      public boolean isRegularVillager()
    • setRegularVillager

      public void setRegularVillager(boolean regularVillager)
    • canRestock

      public boolean canRestock()
    • setCanRestock

      public void setCanRestock(boolean canRestock)
    • update

      public void update()
      Description copied from class: Inventory
      Refreshes the inventory for all viewers.
      Overrides:
      update in class Inventory
    • addViewer

      public boolean addViewer(@NotNull @NotNull Player player)
      Description copied from class: Inventory
      This will not open the inventory for player, use Player.openInventory(Inventory).
      Specified by:
      addViewer in interface Viewable
      Overrides:
      addViewer in class Inventory
      Parameters:
      player - the viewer to add
      Returns:
      true if the player has successfully been added