17 Building
Zax71 edited this page 2023-09-02 18:49:18 +01:00

Are you interested in developing? Do you just want your own local copy of Multiverse? Look no further - this page aims to describe how to build any Multiverse plugin from scratch, regardless of your reason.


Requirements

In order to get the Multiverse source and build a plugin, your system must already have the following software:

Software Required Recommended
Java 17 17
Git 1.6 Latest

Windows users will likely have to download installers for each from the respective sites; Linux users can likely find these packages in their distribution's package manager. For Mac users, source-based installers (or alternative package managers like Homebrew) are the preferred method.


Git the source

Once you have all the prerequisites installed, go ahead and fetch the source from GitHub:

$ git clone git://github.com/Multiverse/Multiverse-Core.git

(Note that in this command, and from this point on, you can replace Core with the name of any other Multiverse plugin - Portals, NetherPortals, etc. - to build that plugin.)

Once you have the source cloned, everything should be ready!

Old versions If you want to go back to commits before [443d62580b](443d62580b) you'll need to fetch some of the Git submodules that the Multiverse project uses. Move into the cloned directory, then update your submodules:
$ cd Multiverse-Core
$ git submodule update --init --recursive

After that operation completes, you should have the complete source tree checked out for your preferred Multiverse plugin.


Build the plugin

Once the source is cloned, building is easy. Simply use Gradle to fetch all the other dependencies for Multiverse, run the tests, and generate a JAR file with your plugin:

$ ./gradlew build

The final plugin will be located at ./build/libs/Multiverse-core-<version>.jar. Enjoy!