Class Instance

  • All Implemented Interfaces:
    java.lang.Runnable

    public class Instance
    extends java.lang.Object
    implements java.lang.Runnable
    • Field Detail

      • instance

        public static Instance instance
    • Method Detail

      • getProxyName

        public static @Nullable java.lang.String getProxyName()
        Gets the client's proxy nickname, null if no proxy selected
      • isDeveloperModeActive

        public static boolean isDeveloperModeActive()
        Checks to see if the client's Developer Mode is active
        Returns:
        true if it's active, false otherwise
      • isCovertEnabled

        public static boolean isCovertEnabled()
      • isClientOutdated

        public static boolean isClientOutdated()
        Checks if the currently running client is outdated.

        Note: This assumes the client is in the standard location, if you're running the client directly from a different location it may not be accurate.

        Returns:
        True if there is a newer client version available, false if it fails to check or if there isn't a newer version
      • getClientVersion

        public static @NonNull java.lang.String getClientVersion()
        Returns the current DreamBot client version
        Returns:
        String value of the currently running client version
      • getInstance

        public static @NonNull Instance getInstance()
      • isCacheLoaded

        @Deprecated
        public static boolean isCacheLoaded()
        Deprecated.
        No longer used
      • setDrawScriptPaint

        public static void setDrawScriptPaint​(boolean shouldDraw)
      • getDiscordWebhook

        public @Nullable java.lang.String getDiscordWebhook()
        Gets the user's Discord webhook URL
        Returns:
        the webhook url if they allow access, null otherwise
      • setCanvas

        public void setCanvas​(@NonNull java.awt.Canvas canvas)
      • setMouseInputEnabled

        public void setMouseInputEnabled​(boolean mouseInputEnabled)
      • isMouseInputEnabled

        public static boolean isMouseInputEnabled()
      • dispatchCanvasEvent

        public static void dispatchCanvasEvent​(@NonNull java.awt.AWTEvent event)
      • minimize

        public static void minimize()
        This method minimizes (dock) the whole DreamBot program
      • show

        public static void show()
        This method will un-minimize and bring the whole DreamBot program to the front of your desktop
      • shouldDrawScriptPaint

        public static boolean shouldDrawScriptPaint()
      • run

        public void run()
        Specified by:
        run in interface java.lang.Runnable
      • drawMouse

        public boolean drawMouse()
      • setDrawMouse

        public void setDrawMouse​(boolean drawMouse)
      • failedToLoad

        public boolean failedToLoad()
      • isWorldSet

        public boolean isWorldSet()
      • enableInputs

        public void enableInputs()
      • destroy

        public void destroy()
      • getLoader

        public org.dreambot.internal.loader.InstanceLoader getLoader()
      • getUI

        public org.dreambot.internal.InstanceGUI getUI()
      • getApplet

        public java.applet.Applet getApplet()
      • update

        public void update()
      • setKeyboardInputEnabled

        public void setKeyboardInputEnabled​(boolean keyboardInputEnabled)
      • getUserAgent

        public @Nullable java.lang.String getUserAgent()
      • addEventListener

        public void addEventListener​(@NonNull java.util.EventListener listener)
      • removeEventListener

        public void removeEventListener​(@NonNull java.util.EventListener listener)
      • getRandomManager

        public @Nullable RandomManager getRandomManager()
        Gets the current script's random manager, or null if script manager/current script are null.
        Returns:
        Current script random manager or null if current script is null
      • getRandomManagerThread

        public static @Nullable java.lang.Thread getRandomManagerThread()
      • onInterrupted

        public static void onInterrupted​(java.lang.Throwable e)
      • setDisableGameExplorer

        public static void setDisableGameExplorer​(boolean disabled)
        Sets whether the Game Explorer window can be opened and used or not. If the game explorer is open this is set to false, it will close the explorer.
        Parameters:
        disabled - true or false
      • setForceDisableMouseInput

        public static void setForceDisableMouseInput​(boolean disabled)
        Forces no human mouse input allowed
        Parameters:
        disabled - true/false
      • setForcePaint

        public static void setForcePaint​(boolean disabled)
        Forces showing the script paint, ignores user settings.
        Parameters:
        disabled - true forces script paint to show, false uses user settings.
      • setDisableDebugging

        public static void setDisableDebugging​(boolean disabled)
        Disables debugging tools and logs. If the Game Explorer is open when this is set to true, it will close the game explorer.
        Parameters:
        disabled -
      • setShouldStart

        public static void setShouldStart​(boolean shouldStart)
      • isForceDisableMouseInput

        public static boolean isForceDisableMouseInput()
      • getCanvas

        public static java.awt.Canvas getCanvas()
      • isHidingUsernames

        public static boolean isHidingUsernames()
      • getWrapper

        public org.dreambot.internal.loader.InstanceWrapper getWrapper()
      • getFieldLoader

        public org.dreambot.internal.fields.FieldLoader getFieldLoader()
      • isKeyboardInputEnabled

        public boolean isKeyboardInputEnabled()
      • isForcePaint

        public static boolean isForcePaint()
      • isDisableGameExplorer

        public static boolean isDisableGameExplorer()
      • isDisableDebugging

        public static boolean isDisableDebugging()