Skip to content

Commit

Permalink
Update CONTRIBUTING.md (GeyserMC#1787)
Browse files Browse the repository at this point in the history
* Update CONTRIBUTING.md

* Update CONTRIBUTING.md

Ok that works to but i meant for that to mean 'put all your annotation stuff here' obviously it wont compile, but this works too

Co-authored-by: theminecoder <[email protected]>

Co-authored-by: YHDiamond <[email protected]>
Co-authored-by: theminecoder <[email protected]>
  • Loading branch information
3 people authored Jan 28, 2021
1 parent 5a8604f commit f566634
Showing 1 changed file with 30 additions and 23 deletions.
53 changes: 30 additions & 23 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,36 @@ Thank for for considering a contribution! Generally, Geyser welcomes PRs from ev
We have some general style guides that should be applied throughout the code:

```java

private static final AIR_ITEM = 0; // Static item names should be capitalized

public Int2IntMap items = new Int2IntOpenHashMap(); // Use the interface as the class type but initialize with the implementation.

public int nameWithMultipleWords = 0;

/**
* Javadoc comment to explain what a function does.
*/
public void applyStuff() {
if (condition) {
// Do stuff.
} else if (anotherCondition) {
// Do something else.
}

switch (value) {
case 0:
break;
case 1:
break:
}
public class LongClassName {
private static final int AIR_ITEM = 0; // Static item names should be capitalized

public Int2IntMap items = new Int2IntOpenHashMap(); // Use the interface as the class type but initialize with the implementation.

public int nameWithMultipleWords = 0;

/**
* Javadoc comment to explain what a function does.
*/
@RandomAnnotation(stuff = true, moreStuff = "might exist")
public void applyStuff() {
Variable variable = new Variable();
Variable otherVariable = new Variable();

if (condition) {
// Do stuff.
} else if (anotherCondition) {
// Do something else.
}

switch (value) {
case 0:
stuff();
break;
case 1:
differentStuff();
break;
}
}
}
```

Expand Down

0 comments on commit f566634

Please sign in to comment.