Class NmsBundles
NmsBundle per versions/* module, by name, exactly once.
This is the only place in the library that loads a version-specific class reflectively, and it is
deliberately the only one: fifteen Class.forName call sites would be fifteen surfaces to
keep in sync, and this library's per-version class names are irregular enough
(Teleporter1_8_R1, ChunkProvider_1_21_4, BlockUtil_LATEST) that building
them from a version string is not safe. The adapter name is regular and derived from the Gradle
module name instead, and everything inside a module stays statically typed.
Do not relocate or rename com.kamikazejam.kamicommon.nms.bundle.*. The lookup is by
string. spigot-jar relocates only third-party packages, so KamiCommon is safe as shipped,
but a consumer shading this library under its own relocation rules would break it.
-
Method Summary
-
Method Details
-
forModule
- Parameters:
module- the Gradle module name, e.g.v1_8_R3,v_latest,worlds7- Returns:
- that module's adapter
- Throws:
IllegalStateException- if the module has no adapter, or if this JVM is too old to load it
-