Interface KeySwapHandler

  • All Superinterfaces:
    InventoryCallbackHandler
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface KeySwapHandler
    extends InventoryCallbackHandler
    • Method Detail

      • handle

        boolean handle​(Cause cause,
                       Container container,
                       Slot slot,
                       int slotIndex,
                       ClickType<?> clickType,
                       Slot slot2)
        Handler for inventory ClickTypes.KEY_SWAP callbacks.
        Parameters:
        cause - the cause
        container - the container
        slot - the primary clicked slot
        slotIndex - the primary clicked slot index
        clickType - the type of click
        slot2 - the secondary slot in the interaction.
        Returns:
        false to prevent the action