Interface Villager

    • Method Detail

      • getProfession

        @NotNull
        Villager.Profession getProfession()
        Gets the current profession of this villager.
        Returns:
        Current profession.
      • setProfession

        void setProfession​(@NotNull
                           Villager.Profession profession)
        Sets the new profession of this villager.
        Parameters:
        profession - New profession.
      • getInventory

        @NotNull
        Inventory getInventory()
        Gets this villager's inventory.
        Note that this inventory is not the Merchant inventory, rather, it is the items that a villager might have collected (from harvesting crops, etc.) Get the object's inventory.
        Specified by:
        getInventory in interface InventoryHolder
        Returns:
        The inventory.
      • getRiches

        int getRiches()
        Gets this villager's riches, the number of emeralds this villager has been given.
        Returns:
        the villager's riches
      • setRiches

        void setRiches​(int riches)
        Sets this villager's riches.
        Parameters:
        riches - the new riches
        See Also:
        getRiches()