mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-22 22:45:31 +01:00
[ci skip] Update contributing guidelines to include identifying commit titles in comments (#10162)
This commit is contained in:
parent
17275ffd68
commit
78fcb8e766
1 changed files with 14 additions and 13 deletions
|
@ -206,27 +206,28 @@ when making and submitting changes.
|
||||||
|
|
||||||
All modifications to non-Paper files should be marked.
|
All modifications to non-Paper files should be marked.
|
||||||
|
|
||||||
- Multi-line changes start with `// Paper start` and end with `// Paper end`;
|
- You need to add a comment with a short and identifiable description of the patch:
|
||||||
- You can put a comment with an explanation if it isn't obvious, like this:
|
`// Paper start - <COMMIT DESCRIPTION>`
|
||||||
`// Paper start - reason`.
|
|
||||||
- The comments should generally be about the reason the change was made, what
|
- The comments should generally be about the reason the change was made, what
|
||||||
it was before, or what the change is.
|
it was before, or what the change is.
|
||||||
- Multi-line messages should start with `// Paper start` and use `/* Multi
|
- After the general commit description, you can add additional information either
|
||||||
line message here */` for the message itself.
|
after a `;` or in the next line.
|
||||||
- One-line changes should have `// Paper` or `// Paper - reason`.
|
- Multi-line changes start with `// Paper start - <COMMIT DESCRIPTION>` and end
|
||||||
|
with `// Paper end - <COMMIT DESCRIPTION>`.
|
||||||
|
- One-line changes should have `// Paper - <COMMIT DESCRIPTION>` at the end of the line.
|
||||||
|
|
||||||
Here's an example of how to mark changes by Paper:
|
Here's an example of how to mark changes by Paper:
|
||||||
|
|
||||||
```java
|
```java
|
||||||
entity.getWorld().dontbeStupid(); // Paper - was beStupid() which is bad
|
entity.getWorld().dontBeStupid(); // Paper - Was beStupid(), which is bad
|
||||||
entity.getFriends().forEach(Entity::explode);
|
entity.getFriends().forEach(Entity::explode);
|
||||||
entity.a();
|
entity.updateFriends();
|
||||||
entity.b();
|
|
||||||
// Paper start - use plugin-set spawn
|
// Paper start - Use plugin-set spawn
|
||||||
// entity.getWorld().explode(entity.getWorld().getSpawn());
|
// entity.getWorld().explode(entity.getWorld().getSpawn());
|
||||||
Location spawnLocation = ((CraftWorld)entity.getWorld()).getSpawnLocation();
|
Location spawnLocation = ((CraftWorld)entity.getWorld()).getSpawnLocation();
|
||||||
entity.getWorld().explode(new BlockPosition(spawnLocation.getX(), spawnLocation.getY(), spawnLocation.getZ()));
|
entity.getWorld().explode(new BlockPosition(spawnLocation.getX(), spawnLocation.getY(), spawnLocation.getZ()));
|
||||||
// Paper end
|
// Paper end - Use plugin-set spawn
|
||||||
```
|
```
|
||||||
|
|
||||||
We generally follow the usual Java style (aka. Oracle style), or what is programmed
|
We generally follow the usual Java style (aka. Oracle style), or what is programmed
|
||||||
|
|
Loading…
Reference in a new issue