diff options
author | Zach Brown <[email protected]> | 2016-08-04 17:47:12 -0500 |
---|---|---|
committer | Zach Brown <[email protected]> | 2016-08-04 17:47:12 -0500 |
commit | c5f025608425e9b028853f1dcf3a5728899fc7f7 (patch) | |
tree | 001f32c1fa766e50b358c512b1df88474343e9f6 /CONTRIBUTING.md | |
parent | ae77393ad9a9b9cdf268662375efa3154b0e84af (diff) | |
download | Paper-c5f025608425e9b028853f1dcf3a5728899fc7f7.tar.gz Paper-c5f025608425e9b028853f1dcf3a5728899fc7f7.zip |
Syntax highlighting and typo fix in CONTRIBUTING
Thanks @jamierocks
Diffstat (limited to 'CONTRIBUTING.md')
-rw-r--r-- | CONTRIBUTING.md | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 214ec38485..4d814747ce 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -115,11 +115,11 @@ entity.getWorld().explode(new BlockPosition(spawnLocation.getX(), spawnLocation. In an effort to make future updates easier on ourselves, Paper tries to use obfuscation helpers whenever possible. The purpose of these helpers is to make the code more readable. These helpers should be be made as easy to inline as possible by the JVM whenever possible. An obfuscation helper to get an obfuscated field may be as simple as something like this: -``` +```java public final int getStuckArrows() { return this.bY(); } // Paper - OBFHELPER ``` -Or it may be as compex as forwarding an entire method so that it can be overriden later: -``` +Or it may be as complex as forwarding an entire method so that it can be overriden later: +```java public boolean be() { // Paper start - OBFHELPER return this.pushedByWater(); @@ -136,7 +136,7 @@ While they may not always be done in exactly the same way each time, the general To use a configurable value in your patch, add a new entry in either ```PaperConfig``` or ```PaperWorldConfig```. Use the former if a value must remain the same throughout all worlds, or the latter if it can change between worlds. The latter is preferred whenever possible. ###```PaperConfig``` example: -``` +```java public static boolean saveEmptyScoreboardTeams = false; private static void saveEmptyScoreboardTeams() { saveEmptyScoreboardTeams = getBoolean("settings.save-empty-scoreboard-teams", false); @@ -146,7 +146,7 @@ Notice that the field is always public, but the setter is always private. This i ```if (!PaperConfig.saveEmptyScoreboardTeams) {``` ###```PaperWorldConfig``` example: -``` +```java public boolean useInhabitedTime = true; private void useInhabitedTime() { useInhabitedTime = getBoolean("use-chunk-inhabited-timer", true); |