Class NativePackets

java.lang.Object
devs.beer.nativepackets.api.NativePackets

public final class NativePackets extends Object
Process-wide access to the NativePackets runtime owned by the server plugin.
  • Method Details

    • api

      public static NativePacketsApi api()
      Returns the active runtime.
      Returns:
      active NativePackets API
      Throws:
      IllegalStateException - when the plugin is absent or not enabled
    • available

      public static boolean available()
      Reports whether the runtime is ready for consumers.
      Returns:
      whether api() is available
    • install

      public static void install(NativePacketsApi implementation)
      Publishes the runtime during plugin enable.
      Parameters:
      implementation - runtime implementation
    • uninstall

      public static void uninstall(NativePacketsApi implementation)
      Clears the runtime during plugin disable when the identical implementation owns it.
      Parameters:
      implementation - runtime implementation