Class TradeWithVillagerEvent


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

This event is not

invalid reference
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 Link icon

  • Constructor Details Link icon

  • Method Details Link icon

    • getMerchantOffer Link icon

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

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