Class TextBundles

java.lang.Object
com.kamikazejam.kamicommon.nms.text.TextBundles

@Internal public final class TextBundles extends Object
Resolves one TextBundle per shaded-tier module, out of the nested jar.

The counterpart to NmsBundles, and separate from it on purpose. NmsBundles loads adapters from the plugin classloader; these come from the CHILD loader that holds the relocated Adventure, because they are the implementations that name it.

Only the tiers that use the relocated copy go through here, meaning servers below 1.18.2: v1_11_R1, v1_15_R1, v1_16_R3 and v1_17_R1. From 1.18.2 upward the server has Adventure natively and those modules implement text directly with no indirection.

  • Method Details

    • forModule

      @NotNull public static @NotNull TextBundle forModule(@NotNull @NotNull String module)
      Parameters:
      module - the Gradle module name whose text implementation is wanted, e.g. v1_17_R1
      Throws:
      IllegalStateException - if the nested jar is missing or has no implementation for it