Skip to content

SapphireMC/Sapphire

Repository files navigation

Sapphire

Another pufferfish fork

Downloads - wiki (coming soon)

License

GPL-3.0-only License

Plugin development

  • We recommend using gradle with kotlin dsl as the build system for your plugin.

API

repositories {
    maven("https://repo.activmine.ru/public/")
    // Other repositories
}
dependencies {
    compileOnly("io.sapphiremc.sapphire:sapphire-api:1.20.4-R0.1-SNAPSHOT")
    // Other dependencies
}

Dev bundle

plugins {
    `java-library`
    id("io.papermc.paperweight.userdev") version "1.5.15"
    // Other plugins
}
repositories {
    maven("https://repo.activmine.ru/public")
    // Other repositories
}
dependencies {
    paperweight.devBundle("io.sapphiremc.sapphire", "1.20.4-R0.1-SNAPSHOT")
    // Other dependencies
}

Setting up and building

Initial setup

  • Run ./gradlew applyPatches in the root directory

Creating a patch

  • Patches are effectively just commits in either sapphire-api or sapphire-server.
  • To create one, just add a commit to either repo and run ./gradlew rebuildPatches, and a patch will be placed in the patches folder.
  • Modifying commits will also modify its corresponding patch file.

See CONTRIBUTING.md for more detailed information.

Compiling

  • Use the command ./gradlew build to build the API and server.

Compiled JARs will be placed under sapphire-api/build/libs and sapphire-server/build/libs.

  • To get a Paperclip jar, run ./gradlew renamedReobfPaperclipJar.
  • To get a Bundler jar, run ./gradlew createReobfBundlerJar

Compiled JAR (Paperclip or Bundler) will be placed under build/libs/

  • To install the sapphire-api and dev-bundle dependencies to your local Maven repo, run ./gradlew publishToMavenLocal