Skip to content

Latest commit

 

History

History
22 lines (15 loc) · 2.72 KB

File metadata and controls

22 lines (15 loc) · 2.72 KB

Repository Guidelines

Project Structure & Module Organization

Core plugin code lives in src/main/kotlin/me/grut/templateCodexProject; TemplateCodexProject.kt is the entry point. Resources such as plugin.yml stay in src/main/resources and expand Gradle properties. Add tests under src/test/kotlin, mirroring the production package tree. Build scripts reside in build.gradle.kts, and the Gradle wrapper lives in gradle/.

Build, Test, and Development Commands

./gradlew build produces the shaded jar in build/libs/. Use ./gradlew shadowJar when you only need the packaged artifact. Launch a Paper 1.20 sandbox with ./gradlew runServer to load the plugin for manual checks, and reset artifacts with ./gradlew clean before release builds.

Coding Style & Naming Conventions

Adhere to the Kotlin official style: four-space indentation, UpperCamelCase types, lowerCamelCase members, and kebab-case resource files. Favor FastUtil collections where high-volume maps or lists are needed. Keep handlers short, extract private helpers, and stay within Java 17 API boundaries. No formatter is enforced; run IDE formatting before submitting.

Command Framework Practices

Commands are built with revxrsal Lamp. In onEnable, instantiate BukkitLamp.builder(this) with a custom CommandExceptionHandlerImpl that replies with your localized usage message on ExpectedLiteralException. Register command classes (e.g., MWBuildsCommand) annotated with @Command and @Subcommand, defaulting optional Player parameters to actor.asPlayer(). Provide auto-complete by implementing SuggestionProvider classes like MenuSuggestionProvider or TownSuggestionProvider and referencing them through @SuggestWith. Reference Lamp docs at https://foxhut.gitbook.io/lamp-docs for annotation details, and declare io.github.revxrsal:lamp.common plus io.github.revxrsal:lamp.bukkit version 4.0.0-rc.12 in dependencies.

Testing Guidelines

Add JVM tests under src/test/kotlin; prefer JUnit 5 with MockBukkit or Paper harnesses to cover command flows, event listeners, and config parsing. Name files <FeatureName>Test, and execute ./gradlew test before opening a pull request.

Commit & Pull Request Guidelines

With no history yet, follow Conventional Commits (feat:, fix:, chore:) and keep changes tightly scoped. Pull requests should link relevant issues, summarize player-facing impact, note test results, and attach console logs or screenshots from the Paper sandbox. Secure peer review prior to merging.

Deployment Tips

After building, copy the shaded jar from build/libs/ into your Paper server’s plugins/ directory. Keep the version in plugin.yml aligned with Gradle’s version to prevent mismatch warnings.