From 5bfe48c8d9bd75ff649878dc5ad2ff53f032da36 Mon Sep 17 00:00:00 2001 From: Auxilor Date: Tue, 17 Jan 2023 17:48:45 +0000 Subject: [PATCH] Updated CONTRIBUTING.md --- CONTRIBUTING.md | 37 +++---------------------------------- 1 file changed, 3 insertions(+), 34 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c39dbd16..c12d809b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,38 +1,7 @@ # How to contribute to eco -## Codestyle +Please open any Pull Requests into the `develop` branch or ideally into a new branch for your changes. PRs that go into `master` won't be ignored, but I have to checkout and merge manually, which makes your PR show as being closed. -1. The eco checkstyle is in /config/checkstyle.xml +Do not write any Kotlin-only APIs; all API components should be written in Java, Kotlin extensions should not have functionality that isn't available in java. The same applies the other way round, do not write any backend code in Java, it should be Kotlin-exclusive. -- The pull request must not have any checkstyle issues. -- Every method and field must have a javadoc attached. - -2. Use JetBrains annotations - -- Every parameter should be annotated with @NotNull or @Nullable - -3. Imports - -- No group (*) imports. -- No static imports. - -4. Kotlin - -- Kotlin should be the only language used in the backend, java should be the only language used in the frontend. -- Kotlin API extensions should only be for creating extension functions and extra niceties that aren't possible in java. - Do not write API components in kotlin. -- Kotlin code should never be called directly from the frontend Java API. Kotlin API extensions should always rely on - java, not the other way round. - -## Dependency Injection - -- eco uses Dependency Injection -- Any calls to Eco#getHandler#getEcoPlugin are code smells and should never be used unless **absolutely necessary**. -- NamespacedKeys, FixedMetadataValues, Runnables, and Schedules should be managed using AbstractEcoPlugin through DI. -- Any DI class should extend PluginDependent where possible. If the class extends another, then you **must** store the - plugin instance in a private final variable called **plugin** with a private or protected getter. - -## Other - -- All drops **must** be sent through a DropQueue - calls to World#dropItem will get your PR rejected. -- eco is built with java 17. \ No newline at end of file +If you have any questions about contributing, feel free to ask in the [Discord](https://discord.gg/ZcwpSsE)! \ No newline at end of file