Class NetworkApiException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.geysermc.geyser.api.network.NetworkApiException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
NetworkDispatchException, NetworkRegistrationException

public class NetworkApiException extends RuntimeException
Base class for all Geyser networking API failures.

Each exception carries an optional source identifying who is responsible for the failure (typically the namespace of the extension or plugin that owns the channel involved). The detail message is written to be readable by server administrators who are not developers, so they know which third party to contact.

Since:
2.9.2
See Also:
  • Constructor Details

    • NetworkApiException

      public NetworkApiException(@Nullable String source, String message)
    • NetworkApiException

      public NetworkApiException(@Nullable String source, String message, Throwable cause)
  • Method Details

    • source

      public @Nullable String source()
      Returns the namespace of the party responsible for this failure.

      For extension-owned channels this is the extension id. For inbound custom payloads originating from a Java server plugin or mod this is the namespace of the payload. null indicates the responsible party could not be identified.

      Returns:
      the responsible party, or null if not known