Class MouseButtonEvent

java.lang.Object
dev.myriadclient.api.event.Cancellable
dev.myriadclient.api.event.events.MouseButtonEvent

public final class MouseButtonEvent extends Cancellable
A mouse button was pressed or released in the game window, in a screen or not. Posted on the render thread before Minecraft handles it. Cancel it to hide it from Minecraft (no attack or use, no click in the screen).
  • Constructor Summary

    Constructors
    Constructor
    Description
    MouseButtonEvent(int button, int action, int modifiers, boolean inScreen)
    Core's; only Myriad makes these.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    InputConstants.PRESS or InputConstants.RELEASE.
    int
    Which button: InputConstants.MOUSE_BUTTON_LEFT, _RIGHT, _MIDDLE, or higher (side buttons).
    boolean
    Whether a screen was open when the button changed.
    boolean
    Whether the button went down.
    int
    The modifier keys held, as InputConstants.MOD_* bits (MOD_SHIFT, MOD_CONTROL...).

    Methods inherited from class Cancellable

    cancel, isCancelled, setCancelled

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • MouseButtonEvent

      @Internal public MouseButtonEvent(int button, int action, int modifiers, boolean inScreen)
      Core's; only Myriad makes these.
  • Method Details

    • button

      public int button()
      Which button: InputConstants.MOUSE_BUTTON_LEFT, _RIGHT, _MIDDLE, or higher (side buttons).
    • action

      public int action()
      InputConstants.PRESS or InputConstants.RELEASE.
    • modifiers

      public int modifiers()
      The modifier keys held, as InputConstants.MOD_* bits (MOD_SHIFT, MOD_CONTROL...).
    • inScreen

      public boolean inScreen()
      Whether a screen was open when the button changed.
    • isPress

      public boolean isPress()
      Whether the button went down.