Skip to content

Latest commit

 

History

History
96 lines (77 loc) · 3.68 KB

CONTRIBUTING.md

File metadata and controls

96 lines (77 loc) · 3.68 KB

Contributing

You readed through our code and thought "What a mess, I could do this 1000 times more efficient" or you want to add a new feature? Then you are welcome to contribute to our project.

First of all, Fork this repository by clicking the Fork button on GitHub. You can then clone your fork within eclipse and change everything you want to change or add the new features you want to add.

While adding your code, please follow these simple rules to make our lives easier

  • Avoid removing our code, also if it is just a comment or a warning from eclipse, because if there is a warning and we don't remove it, we have done this on purpose. If you find a bug which you can fix by removing our code, you can do it of course :)
  • Never remove something if you don't know what you are doing.
  • If your work is done, hit [Ctrl + Shift + F] inside all files which you have edited to format it correctly.

For example this code would not be acceptable:

List<ExampleObject> myList = new List<ExampleObject>();
for(ExampleObject eO:myList){
doMyWork();
}
if(someBoolean){
if(someOtherBoolean){
if(thirdBoolean){
if(string.equals("test"){
doSomeOtherWork();
}
}
}
}

It should look like that to be acceptable:

List<ExampleObject> myList = new List<ExampleObject>();
for(ExampleObject eO : myList){
    doMyWork();
}

if(someBoolean){
    if(someOtherBoolean){
        if(thirdBoolean){
            if(string.equals("test"){
                doSomeOtherWork();
            }
        }
    }
}
  • Before creating a pull request, organize all imports by right clicking your code and hitting Source > Organize imports

Something like this would not be acceptable:

import java.util.List;
import org.bukkit.Location;
import java.util.UUID;
import org.bukkit.configuration.file.FileConfiguration;
import java.util.Arrays;
import org.bukkit.ChatColor;
import java.util.ArrayList;
import org.bukkit.entity.Player;
import org.bukkit.Bukkit;

It should look like this, sorted and organized:

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.UUID;

import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
  • Avoid creating pull requests before testing your changes. You should always test your code at least once before creating a pull request. If we encounter many problems with your code, your next pull requests may not be accepted.

Create the pull request

If you followed these rules during your work, your pull request will likely be accepted.
Just create a pull request for your fork on the original repository site.
If you are unhappy with our rules, create a new issue and ask what you want to change.
If you want to be named in the credits, just leave a comment inside our code near to your changes and we will name you on the Spigot Wiki.

Exporting the plugin for testing purposes

We use Maven for our project, so if you want to export the plugin as a jar file, right click the pom.xml file inside eclipse and hit Run As > Maven build. Now type clean install inside the goals. Then go ahead and change the Tab from Main to JRE. You must select a version 7 JDK (for example under Alternate JRE: the jdk1.7.0_79).
Note: You must have a JDK installed and referenced inside your PATH variable to be able to build the jar with Maven.

Once it has finished exporting, you should have a ragemode-vX.X.jar inside your target folder. This is the plugin file which you should now copy to your plugins folder in your Bukkit/Spigot server.