Interface AbstractVillager

All Superinterfaces:
Ageable, Attributable, CommandSender, Creature, Damageable, Entity, InventoryHolder, LivingEntity, Lootable, Merchant, Metadatable, Mob, Nameable, NPC, Permissible, PersistentDataHolder, ProjectileSource, ServerOperator
All Known Subinterfaces:
Villager, WanderingTrader

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

    • 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.