Interface Interactable

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      boolean click()
      Clicks this entity in an interactable point
      boolean contains​(java.awt.Point point)
      Checks if the projected bounds of this entity contains the Point provided.
      default @Nullable InteractablePoint getInteractionPoint()
      Gets a point within the entity that can be interacted with.
      @Nullable InteractablePoint getInteractionPoint​(java.awt.Point origin)
      Gets a point within the entity that can be interacted with.
      double getVisibility()
      Returns a rough estimate of how visible this entity is as a percent (0 to 100)
      boolean hasDynamicBounds()  
      default boolean hover()
      Moves the mouse over this entity
      default boolean interact​(@Nullable java.lang.String action)  
      default boolean interact​(@Nullable java.lang.String action, @Nullable java.lang.String target)  
      default boolean interact​(@Nullable java.lang.String action, @Nullable java.util.regex.Pattern target)  
      default boolean interact​(@Nullable java.util.regex.Pattern action)  
      default boolean interact​(@Nullable java.util.regex.Pattern action, @Nullable java.lang.String target)  
      boolean interact​(@Nullable java.util.regex.Pattern action, @Nullable java.util.regex.Pattern target)
      Attempts to match action and target using Matcher.find() and then interacts with the appropriate menu item
      default boolean isHovered()
      Gets whether or not this entity is being hovered.
      boolean isVisible()
      Whether the entity is visible
    • Method Detail

      • isVisible

        boolean isVisible()
        Whether the entity is visible
        Returns:
        true if visible, and false if not visible
      • getVisibility

        double getVisibility()
        Returns a rough estimate of how visible this entity is as a percent (0 to 100)
      • hasDynamicBounds

        boolean hasDynamicBounds()
      • getInteractionPoint

        @Nullable
        default @Nullable InteractablePoint getInteractionPoint()
        Gets a point within the entity that can be interacted with. Assumes the origin is the current mouse position.
        Returns:
        an InteractablePoint if available, otherwise null
      • getInteractionPoint

        @Nullable
        @Nullable InteractablePoint getInteractionPoint​(java.awt.Point origin)
        Gets a point within the entity that can be interacted with. Takes into account the direction of movement from the origin point.
      • contains

        boolean contains​(java.awt.Point point)
        Checks if the projected bounds of this entity contains the Point provided.
        Parameters:
        point -
        Returns:
      • click

        boolean click()
        Clicks this entity in an interactable point
        Returns:
        true if successfully clicked
      • hover

        default boolean hover()
        Moves the mouse over this entity
        Returns:
        true if the mouse is hovering the entity
      • isHovered

        default boolean isHovered()
        Gets whether or not this entity is being hovered.
        Returns:
        true if the entity is currently being hovered, otherwise false.
      • interact

        boolean interact​(@Nullable
                         @Nullable java.util.regex.Pattern action,
                         @Nullable
                         @Nullable java.util.regex.Pattern target)
        Attempts to match action and target using Matcher.find() and then interacts with the appropriate menu item
        Parameters:
        action - The pattern to match the action with, if null it's ignored
        target - The pattern to match the target with, if null it's ignored
      • interact

        default boolean interact​(@Nullable
                                 @Nullable java.lang.String action)
      • interact

        default boolean interact​(@Nullable
                                 @Nullable java.util.regex.Pattern action)
      • interact

        default boolean interact​(@Nullable
                                 @Nullable java.lang.String action,
                                 @Nullable
                                 @Nullable java.util.regex.Pattern target)
      • interact

        default boolean interact​(@Nullable
                                 @Nullable java.util.regex.Pattern action,
                                 @Nullable
                                 @Nullable java.lang.String target)
      • interact

        default boolean interact​(@Nullable
                                 @Nullable java.lang.String action,
                                 @Nullable
                                 @Nullable java.lang.String target)