Interface Callbacks


  • public interface Callbacks
    Interface of callbacks the injected client uses to send events
    • Method Detail

      • post

        void post​(Object event)
        Post an event. See the events in net.runelite.api.events.
        Parameters:
        event - the event
      • postDeferred

        void postDeferred​(Object event)
        Post a deferred event, which gets delayed until the next cycle.
        Parameters:
        event - the event
      • tick

        void tick()
        Called at the beginning of each tick
      • tickEnd

        void tickEnd()
        Called at the end of each tick
      • frame

        void frame()
        Called each frame
      • updateNpcs

        void updateNpcs()
        Called after receiving update NPCs packet from server.
      • drawScene

        void drawScene()
        Called after the scene is drawn.
      • drawAboveOverheads

        void drawAboveOverheads()
        Called after logic that is drawing 2D objects is processed.
      • draw

        void draw​(MainBufferProvider mainBufferProvider,
                  Graphics graphics,
                  int x,
                  int y)
        Client top-most draw method, rendering over top of most of game interfaces.
        Parameters:
        mainBufferProvider - the main buffer provider
        graphics - the graphics
        x - the x
        y - the y
      • drawInterface

        void drawInterface​(int interfaceId,
                           List<WidgetItem> widgetItems)
        Called after an interface has been drawn
        Parameters:
        interfaceId - the interface id
        widgetItems - Widget items within the interface
      • drawLayer

        void drawLayer​(Widget layer,
                       List<WidgetItem> widgetItems)
        Called after a widget layer has been drawn
        Parameters:
        layer - The layer
        widgetItems - Widget items within the layer
      • mousePressed

        MouseEvent mousePressed​(MouseEvent mouseEvent)
        Mouse pressed event. If this event will be consumed it will not be propagated further to client.
        Parameters:
        mouseEvent - the mouse event
        Returns:
        the mouse event
      • mouseReleased

        MouseEvent mouseReleased​(MouseEvent mouseEvent)
        Mouse released event. If this event will be consumed it will not be propagated further to client.
        Parameters:
        mouseEvent - the mouse event
        Returns:
        the mouse event
      • mouseClicked

        MouseEvent mouseClicked​(MouseEvent mouseEvent)
        Mouse clicked event. If this event will be consumed it will not be propagated further to client.
        Parameters:
        mouseEvent - the mouse event
        Returns:
        the mouse event
      • mouseEntered

        MouseEvent mouseEntered​(MouseEvent mouseEvent)
        Mouse entered event. If this event will be consumed it will not be propagated further to client.
        Parameters:
        mouseEvent - the mouse event
        Returns:
        the mouse event
      • mouseExited

        MouseEvent mouseExited​(MouseEvent mouseEvent)
        Mouse exited event. If this event will be consumed it will not be propagated further to client.
        Parameters:
        mouseEvent - the mouse event
        Returns:
        the mouse event
      • mouseDragged

        MouseEvent mouseDragged​(MouseEvent mouseEvent)
        Mouse dragged event. If this event will be consumed it will not be propagated further to client.
        Parameters:
        mouseEvent - the mouse event
        Returns:
        the mouse event
      • mouseMoved

        MouseEvent mouseMoved​(MouseEvent mouseEvent)
        Mouse moved event. If this event will be consumed it will not be propagated further to client.
        Parameters:
        mouseEvent - the mouse event
        Returns:
        the mouse event
      • mouseWheelMoved

        MouseWheelEvent mouseWheelMoved​(MouseWheelEvent event)
        Mouse wheel moved event. If this event will be consumed it will not be propagated further to client.
        Parameters:
        event - the event
        Returns:
        the mouse wheel event
      • keyPressed

        void keyPressed​(KeyEvent keyEvent)
        Key pressed event.
        Parameters:
        keyEvent - the key event
      • keyReleased

        void keyReleased​(KeyEvent keyEvent)
        Key released event.
        Parameters:
        keyEvent - the key event
      • keyTyped

        void keyTyped​(KeyEvent keyEvent)
        Key typed event.
        Parameters:
        keyEvent - the key event
      • draw

        boolean draw​(Renderable renderable,
                     boolean drawingUi)
        Called to test if a renderable should be drawn this frame
        Parameters:
        renderable - the renderable
        drawingUi - if this is the 2d ui, such as hp bars or hitsplats
        Returns:
        false to prevent drawing
      • error

        void error​(String message,
                   Throwable reason)
        Called when a client error occurs
        Parameters:
        message -
        reason -
      • openUrl

        void openUrl​(String url)
        Called when the client wants to open a URL
        Parameters:
        url -
      • isRuneLiteClientOutdated

        boolean isRuneLiteClientOutdated()
        Returns if the current runelite client is outdated or not
        Returns: