Class NetherNetServer
java.lang.Object
org.geysermc.geyser.network.bedrock.nethernet.NetherNetServer
- All Implemented Interfaces:
org.geysermc.geyser.api.event.EventRegistrar
public final class NetherNetServer
extends Object
implements org.geysermc.geyser.api.event.EventRegistrar
The NetherNet (WebRTC) transport, used instead of RakNet: inbuilt HTTP signaling, NXS provider registration, or both,
all on the Bedrock address, and on the Bedrock port unless "webrtc-port" or -DgeyserSignalingPort move them.
Its state (signing identity, provider registration and DTLS identity) lives in the "nethernet" folder next to the config.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordWhat each signaling mode sends to joining players. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidWaits forshutdown()to stop the provider, which holds its state directory and UDP port until then.@Nullable io.netty.channel.Channel@Nullable org.cloudburstmc.netty.signaling.ProviderClientstatic StringproviderFailure(Throwable failure) static org.cloudburstmc.netty.signaling.provider.ProviderRuntimeConfiguration.SettingsproviderSettings(GeyserConfig.SignalingConfig signaling, List<String> advertised, GeyserConfig.AdvancedNxsConfig advanced) What the provider runtime is configured with.voidorg.cloudburstmc.netty.signaling.ServerStatusvoidsetServerStatus(org.cloudburstmc.netty.signaling.ServerStatus snapshot) Programmatic complete status override; panel fixed values still take precedence at the provider.voidsetServerStatusSupplier(Supplier<org.cloudburstmc.netty.signaling.ServerStatus> supplier) voidshutdown()voidstart()static @Nullable StringstoreOperatorAction(Path file, Optional<org.cloudburstmc.netty.signaling.ProviderClient.OperatorAction> action) Writes the provider's link to a file only this user can read, as it grants access to this server and a console is often logged.@Nullable StringstoreOperatorAction(Optional<org.cloudburstmc.netty.signaling.ProviderClient.OperatorAction> action) Keeps the provider's link for the operator, such as one to claim this server, in the data folder.
-
Constructor Details
-
NetherNetServer
-
-
Method Details
-
start
public void start() -
providerSettings
public static org.cloudburstmc.netty.signaling.provider.ProviderRuntimeConfiguration.Settings providerSettings(GeyserConfig.SignalingConfig signaling, List<String> advertised, GeyserConfig.AdvancedNxsConfig advanced) throws IOException What the provider runtime is configured with. Geyser reports game outcomes itself.- Throws:
IOException
-
setServerStatus
public void setServerStatus(org.cloudburstmc.netty.signaling.ServerStatus snapshot) Programmatic complete status override; panel fixed values still take precedence at the provider. -
setServerStatusSupplier
public void setServerStatusSupplier(Supplier<org.cloudburstmc.netty.signaling.ServerStatus> supplier) -
restoreAutomaticServerStatus
public void restoreAutomaticServerStatus() -
serverStatus
public org.cloudburstmc.netty.signaling.ServerStatus serverStatus() -
providerClient
public @Nullable org.cloudburstmc.netty.signaling.ProviderClient providerClient() -
advertised
- Returns:
- what each running signaling mode currently sends to joining players
-
storeOperatorAction
public @Nullable String storeOperatorAction(Optional<org.cloudburstmc.netty.signaling.ProviderClient.OperatorAction> action) throws IOException Keeps the provider's link for the operator, such as one to claim this server, in the data folder. SeestoreOperatorAction(Path, Optional).- Throws:
IOException
-
storeOperatorAction
public static @Nullable String storeOperatorAction(Path file, Optional<org.cloudburstmc.netty.signaling.ProviderClient.OperatorAction> action) throws IOException Writes the provider's link to a file only this user can read, as it grants access to this server and a console is often logged. With no link the file is removed.- Returns:
- the provider's text and where its link is, or null when there is none
- Throws:
IOException
-
providerChannel
public @Nullable io.netty.channel.Channel providerChannel() -
gameOutcomes
-
providerFailure
- Returns:
- why a request to the external signaling service failed: the service's own explanation when it gave one, else the exception's type and message
-
shutdown
public void shutdown() -
awaitShutdown
public void awaitShutdown()Waits forshutdown()to stop the provider, which holds its state directory and UDP port until then. Another instance cannot start the provider while they are held.
-