类 TradeWithVillagerEvent


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

This event is not

引用无效
cancellable
, and does not
引用无效
have a result
.

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

引用无效
logical server
.

  • 字段详细资料

  • 构造器详细资料

  • 方法详细资料

    • getMerchantOffer

      public MerchantOffer getMerchantOffer()
      返回 the MerchantOffer selected by the player to trade with。
      返回:
      the MerchantOffer selected by the player to trade with
    • getAbstractVillager

      public AbstractVillager getAbstractVillager()
      返回 the villager the player traded with。
      返回:
      the villager the player traded with