Class TradeSelectEvent

  • All Implemented Interfaces:
    Cancellable

    public class TradeSelectEvent
    extends InventoryInteractEvent
    This event is called whenever a player clicks a new trade on the trades sidebar.

    This event allows the user to get the index of the trade, letting them get the MerchantRecipe via the Merchant.

    • Constructor Detail

      • TradeSelectEvent

        public TradeSelectEvent​(@NotNull
                                InventoryView transaction,
                                int newIndex)
    • Method Detail

      • getIndex

        public int getIndex()
        Used to get the index of the trade the player clicked on.
        Returns:
        The index of the trade clicked by the player
      • getMerchant

        @NotNull
        public Merchant getMerchant()
        Get the Merchant involved.
        Returns:
        the Merchant
      • getHandlerList

        @NotNull
        public static HandlerList getHandlerList()