Interface Merchant

All Superinterfaces:
Carrier, DataHolder, DataHolder.Mutable, Locatable, ValueContainer
All Known Subinterfaces:
Trader, Villager, WanderingTrader

public interface Merchant extends DataHolder.Mutable, Carrier, Locatable
Represents a Merchant which can offer trades to customers.
  • Method Details

    • customer

      Optional<Humanoid> customer()
      Gets the currently trading customer with this merchant.
      Returns:
      The currently trading customer if available
    • setCustomer

      void setCustomer(@Nullable Humanoid humanoid)
      Sets the currently trading customer with this merchant.

      If the humanoid is available, a new trading window may open with this merchant.

      Parameters:
      humanoid - The humanoid to trade with
    • tradeOffers

      default ListValue.Mutable<TradeOffer> tradeOffers()
      Returns:
      The trade offers offered by the merchant