Skip to content

Running the Development Version From Source

Matthew Thornton edited this page Apr 29, 2021 · 22 revisions

If you have not done so already, please follow the Running the Plugin From Source guide first. This will walk you through setting up the basic development environment needed to run any branch of this repository from the source code.


Making Sure You're on the Correct Branch

We like to keep our master branch as stable as possible, so impending updates to the plugin will most likely be found in our development branch.

If you've just followed our guide on Running the Plugin From Source, your editor should by default be set to use the development branch.

You can check to see if you are on the correct branch in the bottom-right corner of your Intellij IDEA window. The Intellij IDEA editor has checked out the develop branch from the Github Repo.

It should be set to the develop branch.

If it is set to the master branch, simply click on master in the bottom-right corner of your window, click on develop under Local Branches, and then select Checkout and Rebase onto Current.

Image detailing how to checkout our development branch.

Setting up VM Options

By default the plugin is set to use resources from our production API. This is normally fine, but often as we make changes to our development branch it necessitates altered functionality of the API. We do not want to risk breaking the version of the latest release of the plugin on RuneLite's Plugin Hub, so we have a separate instance of the API running for developer testing. It is HIGHLY recommended that you set your development environment to utilize the developer API address to be able to have the development version of the plugin operate correctly.

Navigate to the top of your editor and find the configuration dropdown menu, which is shown below:

If you have run our plugin from source before, you can simply edit the existing run configuration. If not, you will not have any preexisting run configurations and will need to create one.

Hit the + button in the top-right corner of the Edit Configurations window and select Application.

On Windows, you should set your configuration options to match the ones below:

On Linux, you may want to utilize OpenJDK instead:

In any case, the most important configuration option to set is to add

-ea -DBotDetectorAPIPath=https://www.osrsbotdetector.com/dev

to VM Options. If you do not see a text field for VM Options press ALT+V to have it appear.

Building and Running the Development Branch

Right-click on build.gradle and select Build Module 'botdetector':

Right-click on the BotDetectorPluginTest.java class and select Create 'BotDetectorPluginText.main()'...

If you've already set up your run configuration as detailed in the first section of this guide, you can go ahead and press Ctrl+Shift+F10 to run RuneLite with the plugin. If not, you'll have to right-click on the BotDetectorPluginTest.java class again and press Run 'bot-detector'.

CAUTION: If You've Installed Bot-Detector From RuneLite's Plugin Hub

If you have installed Bot-Detector through RuneLite's Plugin Hub and launch the plugin from the source code you will end up running the client with TWO instances of the plugin. Things might still work, but your in-game experience may suffer greatly. To mitigate unpredictable behavior, we recommend you perform one of the two options below:

Option 1 (Recommended): Comment Out a Line to Prevent Double-Loading:

To leave the version of the plugin from the Plugin Hub installed, and to temporarily replace it with the development version, you can comment out the following line in the BotDetectorPluginTest class:

The release version of the plugin will still be there whenever you launch RuneLite normally.

Option 2: Uninstall the Bot-Detector Plugin

Open up RuneLite as you normally would and uninstall the Bot-Detector plugin. Now whenever you launch from source, you'll just have the development version of the plugin.

"I'm Having Trouble Getting This to Work."

The best place to get help is on our Discord.

"I've Found a Bug!!"

Feel free to open an issue here.

Also, you can post your findings in the #plugin-issues channel on our Discord.