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
      • clientMainLoop

        void clientMainLoop()
        Called each client cycle.
      • 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.
      • drawAfterWidgets

        void drawAfterWidgets()
      • 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
      • drawItem

        void drawItem​(int itemId,
                      WidgetItem widgetItem)
        Called before the client will render an item widget.
      • 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