Interface NativePacketsApi


public interface NativePacketsApi
Entry point exposed to NativePackets consumers.
  • Method Details

    • version

      String version()
      Returns the NativePackets implementation version.
      Returns:
      implementation version
    • platform

      PlatformInfo platform()
      Returns the detected runtime platform.
      Returns:
      runtime platform
    • listeners

      Returns the public packet listener registry.
      Returns:
      listener registry
    • connection

      ConnectionHandle connection(Object platformPlayer)
      Returns the active connection for a platform player.
      Parameters:
      platformPlayer - platform player owned by this server
      Returns:
      cached connection handle
      Throws:
      IllegalStateException - when the player connection is not injected
    • fast

      Returns allocation-minimal semantic packet sends addressed to platform players.
      Returns:
      stable fast packet sender
    • packets

      Returns the exact-version packet factory.

      The factory creates native packets for the active server version. Its returned packet objects are version-coupled and must only be sent through this runtime's ConnectionHandle.

      Returns:
      exact-adapter packet factory
    • utilities

      PlatformUtilities utilities()
      Returns exact-adapter platform utilities.
      Returns:
      platform utilities
    • textFactory

      NativeTextFactory textFactory()
      Returns the exact-adapter native text factory.
      Returns:
      native text factory