You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+46-66Lines changed: 46 additions & 66 deletions
Original file line number
Diff line number
Diff line change
@@ -1,104 +1,84 @@
1
1
# Machine Contribution Guide
2
-
Greetings! It's great to see that you have chosen to access this document.
3
-
I hope you find it helpful.
4
-
5
2
To begin with, we want to express our gratitude for your willingness to
6
-
contribute to Machine project. Your participation is highly valued and
3
+
contribute to Machine project. Every contribution is highly valued and
7
4
much appreciated!
8
5
9
6
### Requirements
10
-
To begin with, we assume that you possess adequate knowledge in Java
11
-
programming and have selected your preferred IDE.
12
-
However, if you lack proficiency in Java programming, we recommend that
13
-
you refer to the official [Java documentation](https://docs.oracle.com/en/java/).
14
-
15
-
Before continuing, please ensure that you have **JDK 17 and
16
-
Kotlin** installed on your system.
17
-
18
-
Subsequently, to kickstart your contributions,
19
-
you will require a few essential tools.
20
-
While most of these tools come pre-installed with your IDE,
21
-
some may require additional installation:
22
-
- Gradle - *In case your IDE does not support Gradle,
23
-
fret not, you can use the Gradle wrapper (gradlew or gradlew.bat)
24
-
without the need for any installation or configuration.*
7
+
- JDK 17
8
+
- Gradle - *you can use the Gradle wrapper (gradlew or gradlew.bat)
9
+
without the need for any installation or configuration*
25
10
- Git
26
11
27
-
### Safety Rules
28
-
- Contributions must not include any malicious code intended to cause harm to the user or their device.
29
-
- Under no circumstances should contributions contain confidential tokens, passwords, personal API keys, GitHub tokens, or any similar sensitive information.
30
-
- Contributions should avoid slowing or making the server unstable.
31
-
32
12
### General Information
33
-
Adhere to the project's prescribed style guide,
34
-
which is comprehensively detailed in the `STYLE_GUIDE.md` file.
35
-
36
-
It is imperative to test your modifications rigorously.
37
-
Go beyond testing just your alterations; test for any possible
38
-
side effects that may have unintentionally resulted from your changes and
39
-
avoid the frustration of breaking existing functionality.
40
-
41
-
Finally, when you are ready to submit your pull request,
42
-
kindly conform to the provided template.
13
+
- Adhere to the project's style guide, which is comprehensively
14
+
described in the `STYLE_GUIDE.md` file.
15
+
- Test your modifications carefully, make sure they don't cause
16
+
side effects that may cause unintentional behaviour.
17
+
- Contributions must not include any malicious code intended to cause harm to
18
+
the end-user and contain confidential tokens, passwords, personal API keys,
19
+
or any similar information.
20
+
- Finally, when you are ready to submit your pull request, make
21
+
sure to follow the provided template.
43
22
44
23
#### Nullness
45
24
All variables that are either not annotated or annotated with `@NotNull` are
46
-
presumed to be non-null.
25
+
expected to be non-null.
26
+
Null value is allowed only for variables marked with `@Nullable`.
47
27
48
-
#### Other
28
+
#### Recommendations
49
29
- Prevent Stream API if not dealing with large collections of data, use classic loop instead.
50
30
51
31
### Specific Information
52
32
53
33
#### API
54
-
The API is fashioned after its forerunners. It prioritizes brevity
55
-
to ensure simplicity for novices, while still offering ample
56
-
advanced features for more seasoned developers.
34
+
The API is designed after its forerunners. It prioritizes simplicity to
35
+
ensure ease for beginners, while offering enough advanced features for
36
+
more experienced developers.
57
37
58
-
We derive inspiration for designing new APIs mainly from Bukkit,
59
-
Sponge, Minestom, and Krypton, credits where credits due.
38
+
We draw inspiration for the design of new APIs primarily from Bukkit,
39
+
Sponge, Minestom, and Krypton.
60
40
61
41
The Machine API should be structured to evolve seamlessly
62
42
with new Minecraft versions. You should always weigh the potential use cases
63
-
against the prospective maintenance expenses. If the downsides outweigh the
64
-
benefits, it is perhaps not worth pursuing. In addition, it is crucial to
65
-
document your code thoroughly.
43
+
against the maintenance expenses. If the downsides outweigh the
44
+
benefits, it is most likely not worth implementing the idea.
45
+
46
+
Make sure that 100% of your API code is documented with the correct use of code
47
+
contract annotations.
66
48
67
-
Plugin design should rely heavily on dependency injection,
68
-
and avoid the use of static accessors wherever feasible.
69
-
However, some exceptions may exist.
49
+
Plugins should rely on dependency injection, and avoid the use of static
50
+
accessors. Exceptions do exist, but make sure you discuss your idea of
51
+
implementation with others first if you are not sure about the design choice.
70
52
71
53
#### Server
72
-
The server is a bit more intricate than the API and does not impose
73
-
many of the same strict requirements, but there are still some guidelines
54
+
The server is more complex than the API and does not follow many of the
55
+
same strict requirements, but there are still some guidelines
74
56
that you should attempt to follow.
75
57
76
-
The server is not designed to maintain backward compatibility for its
77
-
dependents as it would be prohibitively expensive to maintain and severely
78
-
limit the ability to evolve across Minecraft versions.
58
+
The server is not designed to maintain backwards compatibility as it would
59
+
be expensive to maintain and severely limit the ability to evolve
60
+
across Minecraft versions.
79
61
80
-
Moreover, when designing implementations, it is imperative to ensure that you:
81
-
- Follow the API specification thoroughly.
82
-
- Conduct comprehensive testing to ensure that your code operates
83
-
precisely as intended.
62
+
When designing implementations, ensure that you:
63
+
- Follow the API specification.
64
+
- Test it to make sure that your code operates as intended.
84
65
- Avoid introducing any potentially problematic elements,
85
-
such as unexpected exceptions.
66
+
such as unexpected exceptions.
86
67
87
68
### Licensing
88
-
In order to contribute code, it must be licensed under **GPLv3** by you.
89
-
We assume that any code you contribute is either your own or that you
90
-
have explicit permission to license it to us.
69
+
In order to contribute code, it must be licensed under **GPLv3**;
70
+
it is either your property, or you have express permission to provide
71
+
and license it to us.
91
72
92
73
Third-party code may be accepted in the following circumstances:
93
74
- It is under a compatible license and part of a public, freely-available resource.
94
75
- You have been granted permission to include it.
95
76
96
77
### Lombok
97
-
Throughout the project, we utilize [Lombok](https://projectlombok.org/)
98
-
to minimize boilerplate code and enhance the readability of certain areas.
99
-
If you intend to use Lombok in your commitments, it is essential that you
100
-
use only annotations that do not modify how the code works, rather
101
-
adds functionality and reduce extra code.
78
+
Throughout the project, we use [Lombok](https://projectlombok.org/)
79
+
to minimize boilerplate code and improve its readability.
80
+
If you intend to use Lombok in your commitments, use only annotations
81
+
that do not modify how the code works, rather reduce boilerplate code.
102
82
103
83
**Banned Lombok Features***(Annotations can't be detected by checkstyle so make sure
104
84
you don't use these in your code)*
@@ -114,7 +94,7 @@ you don't use these in your code)*
114
94
| `@Helper` | Makes the code readability worse, doesn't really help much.
115
95
| `@StandardException` | Makes the code readability worse, doesn't really help much.
116
96
117
-
Please be aware that we may choose to remove Lombok from the project
97
+
Please be aware that we may decide to remove Lombok from the project
118
98
at some point in the future. Therefore, avoid overusing it when it is unnecessary.
0 commit comments