Class TradeWithVillagerEvent


public class TradeWithVillagerEvent extends PlayerEvent
Fired when a player trades with an AbstractVillager.

This event is not cancellable, and does not

invalid reference
have a result
.

This event is fired on the main Forge event bus, only on the

invalid reference
logical server
.

  • Field Details

  • Constructor Details

  • Method Details

    • getMerchantOffer

      public MerchantOffer getMerchantOffer()
      Returns the MerchantOffer selected by the player to trade with.
      Returns:
      the MerchantOffer selected by the player to trade with
    • getAbstractVillager

      public AbstractVillager getAbstractVillager()
      Returns the villager the player traded with.
      Returns:
      the villager the player traded with