Enum Class ClickType

java.lang.Object
java.lang.Enum<ClickType>
me.agent.vgui.api.click.ClickType
All Implemented Interfaces:
Serializable, Comparable<ClickType>, Constable

public enum ClickType extends Enum<ClickType>
High-level classification of an inventory click, decoded from the raw click mode + button combination the client sends.
  • Enum Constant Details

    • LEFT

      public static final ClickType LEFT
      Plain left click on a slot.
    • MIDDLE

      public static final ClickType MIDDLE
      Middle click (creative clone).
    • SHIFT_LEFT

      public static final ClickType SHIFT_LEFT
      Shift + left click.
    • SHIFT_RIGHT

      public static final ClickType SHIFT_RIGHT
      Shift + right click.
    • NUMBER_KEY

      public static final ClickType NUMBER_KEY
      Hotbar number key (1-9); see ClickContext.hotbarKey().
    • OFFHAND_SWAP

      public static final ClickType OFFHAND_SWAP
      F key swaps with the offhand.
    • DROP

      public static final ClickType DROP
      Q drops one item.
    • CTRL_DROP

      public static final ClickType CTRL_DROP
      Ctrl+Q drops the whole stack.
    • LEFT_OUTSIDE

      public static final ClickType LEFT_OUTSIDE
      Left click outside the window (would drop the cursor stack).
    • RIGHT_OUTSIDE

      public static final ClickType RIGHT_OUTSIDE
      Right click outside the window (would drop one from the cursor stack).
    • DOUBLE_CLICK

      public static final ClickType DOUBLE_CLICK
      Double click collects matching items to the cursor.
    • DRAG_START

      public static final ClickType DRAG_START
      Started a click-drag ("paint") operation.
    • DRAG_ADD

      public static final ClickType DRAG_ADD
      Added a slot to an ongoing click-drag operation.
    • DRAG_END

      public static final ClickType DRAG_END
      Finished a click-drag operation.
    • UNKNOWN

      public static final ClickType UNKNOWN
      Anything this library does not recognize.
  • Method Details

    • values

      public static ClickType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ClickType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • isShift

      public boolean isShift()
      True for SHIFT_LEFT and SHIFT_RIGHT.
    • isLeft

      public boolean isLeft()
    • isRight

      public boolean isRight()
    • isDrag

      public boolean isDrag()
      True for the three drag phases.
    • isOutside

      public boolean isOutside()
      True when the click happened outside the window bounds.