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/.
./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.
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.
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.
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.
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.
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.