This documentation is no longer updated. Please visit https://pikamug.gitbook.io/quests/
Alert: This information is intended for developers. Learn how to use Java first!
Set up an IDE
If you would like to submit a Pull request (PR) without the use of Github's online tools, or would just like to change some aspects of the plugin for yourself, the best way to do so is to compile the plugin locally on your own machine.
Although this can be accomplished in several programs, this guide will proceed using the popular Eclipse IDE for Java Developers. Get it from their official website at https://www.eclipse.org/downloads/packages/
Once you've got Eclipse up and running, you'll need to install the EGit plugin in order to download the Quests source from Github. The easiest way to install it is to drag this Install link into Eclipse:
Alternatively, you can follow these instructions which will guide you through several windows for installation.
This project also requires the use of Maven by Apache. The included Maven integration that comes with Eclipse should be sufficient, but alternatively you could install a plugin like M2Eclipse.
Download the source code
With your machine raring to go, let's download the Quests source. If you intend on submitting a Pull request, we recommend creating a fork so that you can request that your changes be merged into this repository. Otherwise, if you only want to compile locally with your own edits, copy this link:
git@github.com:PikaMug/Quests.git
In Eclipse, click the Clone a Git Repository button. Look for it in this perspective added by EGit:
Pro-tip: If you don't see the Git Repositories perspective, go to Window -> Open Perspective -> Other... -> Git
Now, you should see a window like this appear:
If you copied the link from earlier, all the necessary fields should populate. Otherwise, enter all the text manually. When you're done click Next >
and then Finish
.
Great! You've got everything you need - you just can't see it yet. Right-click in the Package Explorer perspective, then select Import...
. Under the Maven
drop-down menu, select Existing Maven Projects
then click Next
. For the Root Directory, choose 'Browse' and (on Windows) navigate to C:\Users\YourAccount\git
and select the Quests
folder.
After Eclipse has finished importing, right-click the project name in the Package Explorer perspective and click Properties
. In the left pane, select Resource
and under Text file encoding
select the Other
bubble. Set the drop-down option to "UTF-8".
In the left pane, select Java Build Path
and then the Libraries
tab. Highlight JRE System Library
and click the Edit...
button. Ensure that the Execution environment
is using JavaSE-1.8. If you don't see that option, you will need to download JDK 8 and restart Eclipse. Older versions of Java will not suffice. Select Finish
once done, and you're good to go!
Sharing edits
Once you've made the changes you desire, you're ready to either package it or upload it to your forked repository.
To compile Quests into a jar for use in a CraftBukkit/Spigot server, right-click the Quests project in the Package Explorer perspective and select Run as -> Run Configurations
. In the Run Configurations window, select the New launch configuration
button as shown below:
Name the configuration something familiar like "compile quests" and click Browse Workspace...
to select "quests-parent". For Goals:
simply type "clean package" without the quotes. Finally, click Run
. Any remaining dependencies will be downloaded and (on Windows) you will end up with a finished JAR file in C:\Users\YourAccount\git\Quests\target
.
To upload the changes for future use in a Pull request, right-click the project in the Git Repositories perspective, and select Commit...
. Drag any items in the Unstaged Changes window down into the Staged Changes window, then enter a brief description of the changes you made in the Commit Message window. Once you're completely sure you're ready to share your changes with the world, select the Commit and Push...
button. No turning back now!
Visit your forked repository on Github and select the New pull request
button to ask that the new commit(s) be merged into the master Quests repository. Follow the directions on-screen. Thank you for contributing to Quests!