Enum Class MouseBehavior

java.lang.Object
java.lang.Enum<MouseBehavior>
net.storm.api.interact.MouseBehavior
All Implemented Interfaces:
Serializable, Comparable<MouseBehavior>, Constable

public enum MouseBehavior extends Enum<MouseBehavior>
Defines the behavior mode for determining click coordinates during interactions.

When the interaction system needs to determine where to simulate a mouse click, this enum specifies the strategy used to calculate the click position. Different modes offer varying levels of realism and precision.

See Also:
  • Enum Constant Details

    • CLICKBOXES

      public static final MouseBehavior CLICKBOXES
      Click on the entity's clickbox.

      Calculates a click point within the visible clickbox of the target entity. This mode is the most realistic as it simulates clicking on the actual visible area of game objects, NPCs, or other entities.

    • OFF_SCREEN

      public static final MouseBehavior OFF_SCREEN
      Click off-screen or at an invalid position.

      Uses coordinates outside the game viewport. This can be used for interactions that should not visually affect the cursor position.

    • RANDOM

      public static final MouseBehavior RANDOM
      Click at a random position.

      Generates random click coordinates. This adds unpredictability to interaction patterns for varied behavior.

    • MOUSE_POS

      public static final MouseBehavior MOUSE_POS
      Click at the current mouse position.

      Uses the current cursor position as the click point without any movement. Useful when the cursor is already positioned correctly.

    • DISABLED

      public static final MouseBehavior DISABLED
      Mouse behavior is disabled.

      No mouse position calculation is performed. The interaction will proceed without setting specific click coordinates.

  • Method Details

    • values

      public static MouseBehavior[] 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 MouseBehavior 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