Interface AbstractVillager

All Superinterfaces:
Ageable, Attributable, net.kyori.adventure.audience.Audience, Breedable, CommandSender, Creature, Damageable, Entity, net.kyori.adventure.text.event.HoverEventSource<net.kyori.adventure.text.event.HoverEvent.ShowEntity>, InventoryHolder, LivingEntity, Lootable, Merchant, Metadatable, Mob, Nameable, NPC, Permissible, PersistentDataHolder, net.kyori.adventure.pointer.Pointered, ProjectileSource, ServerOperator
All Known Subinterfaces:
Villager, WanderingTrader

public interface AbstractVillager extends Breedable, NPC, InventoryHolder, Merchant
Represents a villager NPC
  • Method Details

    • getInventory

      @NotNull @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.
    • resetOffers

      void resetOffers()
      Reset this villager's trade offers