Skip to content

Repository files navigation

🚀 KamiCommon V5 🚀

Releases

Latest Release Latest Release

The GitHub releases may be different from the spigot release

API Compatibility

Latest Release Latest Pre-Release

The latest API version may not match the latest Minecraft Version.
(This is okay, as updates are not always required for every Minecraft version.)

DEVELOPMENT ROADMAP: https://github.com/users/Jake-Moore/projects/3


Status: Stable ✅

release/v5 is the current line, and 5.0.0 is its first official release. The API it ships is the one to build against.

  • The API is stable. Breaking changes are reserved for a future major version.
  • New features and fixes land here.
  • One artifact serves every server from 1.8.8 to 26.2, and every module targets Java 8.
  • Full documentation is in the wiki.
  • Coming from v4 or from a v5 pre-release? Start with the Migration Guide.

⚠️ release/v4 Branch: End of Life (EOL)

The release/v4 branch is end-of-life and no longer supported.
No new features, bug fixes, or security patches will be provided.

  • v5 covers everything v4 did and is now the stable line, so there is no longer a reason to stay.
  • Existing v4 builds continue to resolve, but nothing further will be published for them.

KamiCommon

SEE STRUCTURE.md FOR GRADLE MODULE BREAKDOWN

  • A common library originally intended for Spigot plugin development, expanded for standalone use too.
  • The spigot portions of this library aim to support all versions (since 1.8.x) via its sister project KamiCommonNMS

JavaDoc

Modules

There are 6 common modules, 5 of which can be safely shaded

  • The 5 modules that can be shaded are:
    • shared-utils, shared-jar, standalone-utils, standalone-jar, spigot-utils
  • The last module, spigot-jar, compiles the spigot plugin and is only intended to be used as an api
    • When using this module, remember to modify the plugin.yml to include KamiCommon in the depend: list

Java version

KamiCommon runs on Java 8. Every module compiles to class-file major 52, so it loads on any server from 1.8.x upward. That is not a claim about what is bundled, it is what the bytecode targets, and it is checked on every build rather than assumed.

There is one exception.

what you use Java it needs why
everything else 8 matches the oldest server version this library supports
com.kamikazejam.kamicommon.database 11 HikariCP, the connection pool, is Java 11

Nothing else in the jar is above Java 8. HikariCP is the only bundled library that is, and Database is the only class that touches it, so the split is confined to that one package. Call it on an older JVM and you get an IllegalStateException saying so, rather than an UnsupportedClassVersionError naming a relocated class you cannot search for.

For the NMS side

spigot-nms ships implementations for every supported Minecraft version, and each targets the JVM its own version required: Java 8 through 1.16.5, 16 for 1.17, 17 through 1.20.4, 21 from 1.20.5, and 25 for 26.x. They are loaded by name at runtime, so a 1.8.8 server never loads the class built for 26.x, and the jar carries all of them without any one raising the floor for the rest. /kc nmsproviders prints which implementation your server selected for each capability.

If you are contributing

shared-utils, standalone-utils, shared-jar, spigot-utils, spigot-jar and standalone-jar are compiled with --release 8. The compiler will tell you, but so that it is not a surprise: no records, no var, no sealed types, no switch expressions or pattern matching, no List.of, Set.of or Stream.toList. Jdk8.repeat and Jdk8.strip stand in for the String methods added in Java 11.

That constraint is the price of the 1.8.x support in the line above. It is deliberate, and the build enforces it rather than relying on review.

Using KamiCommon

Repository Information

Add the following Repository to your build file.

Maven [pom.xml]:

<repository>
  <id>luxious-public</id>
  <name>Luxious Repository</name>
  <url>https://repo.luxiouslabs.net/repository/maven-public/</url>
</repository>

Gradle (kotlin) [build.gradle.kts]:

maven {
    name = "luxiousPublic"
    url = uri("https://repo.luxiouslabs.net/repository/maven-public/")
}

Gradle (groovy) [build.gradle]:

maven {
  name "luxiousPublic"
  url "https://repo.luxiouslabs.net/repository/maven-public/"
}

Dependency Information

Add the following dependency to your build file.
Replace {VERSION} with the version listed at the top of this page.
Replace {MODULE} with the module you want to use (spigot-jar, standalone-jar, etc.)

Maven Dependency [pom.xml]

<dependency>
  <groupId>com.kamikazejam.kamicommon</groupId>
  <artifactId>{MODULE}</artifactId>
  <version>{VERSION}</version>
  <scope>provided</scope> <!-- set to `compile` if shading a util or standalone jar -->
</dependency>

Gradle Dependency (groovy) [build.gradle]

implementation "com.kamikazejam.kamicommon:{MODULE}:{VERSION}"

Gradle Dependency (kotlin) [build.gradle.kts]

implementation("com.kamikazejam.kamicommon:{MODULE}:{VERSION}")

Features

See the wiki

About

A General Purpose Library for Paper Plugin Development [1.8.x-26.x]

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Used by

Contributors

Languages