Create the Gradle project
The PaperMC repository and a compileOnly dependency: the server provides the API, so you do not bundle it into the jar. The + in 26.3.build.+ picks the latest 26.3 build. When you need reproducible builds, write a specific number, for example 26.3.build.157-beta.
The run-paper plugin adds a runServer task that downloads Paper in the given version and starts it with your plugin.
plugins { java id("xyz.jpenilla.run-paper") version "3.1.0"}group = "com.example"version = "1.0.0"repositories { maven(url = "https://repo.papermc.io/repository/maven-public/") { name = "papermc" }}dependencies { compileOnly("io.papermc.paper:paper-api:26.3.build.+")}java { toolchain.languageVersion.set(JavaLanguageVersion.of(25))}tasks.runServer { minecraftVersion("26.3")}