On this page you learn how to compile MassiveCore and Factions.
Create your MassiveCraft Directory
Step one is to create your MassiveCraft code project directory. It can be a new directory on your desktop for example. The location of this directory does not matter. Place it anywhere you like. Call the directory “MassiveCraft”.
Check out from GitLab
Step two is to check out a few projects from GitHub. You should check them out into your MassiveCraft directory.
- https://gitlab.massivecraft.team/massivecraft/Factions
- https://gitlab.massivecraft.team/massivecraft/MassiveCore
- https://gitlab.massivecraft.team/massivecraft/MassiveCoreXlib
- https://gitlab.massivecraft.team/massivecraft/MassiveSuper
On a unix OS the commands could look like this:
1 2 3 4 5 |
cd MassiveCraft git clone https://gitlab.massivecraft.team/massivecraft/Factions.git git clone https://gitlab.massivecraft.team/massivecraft/MassiveCore.git git clone https://gitlab.massivecraft.team/massivecraft/MassiveCoreXlib.git git clone https://gitlab.massivecraft.team/massivecraft/MassiveSuper.git |
You don’t have to use the command line if you don’t want to. Feel free to use any Git client of your choice. (I.e. GitKraken)
Create the MassiveCraft meta POM
Step three is to manually create a file called pom.xml with the following content:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
4.0.0 <!-- Basics --> com.massivecraft MassiveCraft 1.0.0 pom <!-- Modules --> Factions MassiveCore MassiveCoreXlib MassiveSuper <!-- Build --> install |
Use a text editor of your choice. Could be Notepad++, SublimeText, or Atom or any text editor you like. What is important is that the file has that content, is called “pom.xml” and placed within your MassiveCraft directory.
Build using Maven Command Line
Step four is to build this project using the “mvn” command in your terminal. While standing in your MassiveCraft directory type “mvn clean install”. It will then build all of the four repositories you checked out in the proper order.
Creating an IntelliJ project
Step five is to create an IntelliJ project using this meta pom.xml you just created.
Start the IntelliJ application. In the screenshots I use IntelliJ Ultimate but the Community edition works just fine. Click “Import Project” select your “MassiveCraft/pom.xml” file. The dialog below will open.
Check the checkbox “Import Maven projects automatically”. The other options are fine as is. Click next a few times till the project is fully imported.
That’s about that. As can be seen above you may now hack away!
Other Noteworthy Stuff
The version numbers must match
The version numbers in all of the 5 sub projects must match. The version number in MassiveCraft/pom.xml can be 1.0.0 forever. That is just a dummy version number. For the version numbers in the sub projects however, they must be in sync. So it is important to remember to pull all Git repositories at the same time. I always push in such a way that they are the same in the repositories. If you want older versions I recently started tagging the special version commits. You can for example do “git checkout v2.13.6” as can be seen here: https://gitlab.massivecraft.team/massivecraft/Factions
Is there an official MassiveCraft Maven repository?
Sadly no. Not at this point. This is something we would like to look into so that you would not have to compile everything yourself. Currently however there is no Maven repo and you really have to check all of these repos out, make a meta pom, and compile as described in this tutorial.