Skip to content

PaperModLoader/Paper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Paper

Minecraft Mod Loader

Our goal

Our goal with Paper is to create a modern Minecraft mod loader, utilizing the latest Java standards, in a lightweight fashion.

Code Style

  • 4 spaces should be used in place of tabs.
  • Braces must be placed on the same line, for example:
public void doSomething() {
    if (this.condition) {
        this.doAnotherThing();
    } else {
        this.doSomethingElse();
    }
}
  • 'this.' should be used wherever possible.
    • Bad: greeting = "Hello World"
    • Good: this.greeting = "Hello World"
  • If a singleton is made, it should be made using an enum.
    • Bad:
    public class Singleton {
        public static Singleton INSTANCE;
    }
    • Good:
    public enum Singleton {
        INSTANCE;
    }
  • All static field names should be uppercased and use underscores. For example, SOME_VALUE would be used instead of someValue
  • Static fields should be referenced with their parent class name, even when inside that class.
    • Bad:
    public class Something {
        public static String STRING = "A String!";
        
        public void doSomething() {
            System.out.println(STRING);
        }
    }
    • Good:
    public class Something {
        public static String STRING = "A String!";
        
        public void doSomething() {
            System.out.println(Something.STRING);
        }
    }
  • JavaDocs should be made for everything, with a few exceptions.
    • A description for a getter does not need to be made (although can be), as the @return should already describe what the method does.
    • A description for a constructor does not need to be made (although can be), as the class JavaDoc should describe the class.

Contributing

  1. Fork Paper
  2. Create your feature branch: git checkout -b my-new-feature
  3. Setup paper: gradlew.bat setupPaper setupIDEA --refresh-dependencies
  4. Commit your changes: git commit -m "Add some feature"
  5. Push to the branch: git push origin my-new-feature
  6. Submit a pull request

Releases

No releases published

Packages

No packages published

Languages