Class OpenToLANConfig

java.lang.Object
net.minestom.server.extras.lan.OpenToLANConfig

public class OpenToLANConfig extends Object
Configuration for opening the server to LAN.
See Also:
  • Constructor Details

    • OpenToLANConfig

      public OpenToLANConfig()
      Creates a new config with the port set to random and the delay between pings set to 1.5 seconds and the delay between event calls set to 30 seconds.
  • Method Details

    • port

      @Contract("_ -> this") @NotNull public @NotNull OpenToLANConfig port(int port)
      Sets the port used to send pings from. Use 0 to pick a random free port.
      Parameters:
      port - the port
      Returns:
      this, for chaining
    • pingDelay

      @Contract("_ -> this") @NotNull public @NotNull OpenToLANConfig pingDelay(@NotNull @NotNull Duration delay)
      Sets the delay between outgoing pings.
      Parameters:
      delay - the delay
      Returns:
      this, for chaining
    • eventCallDelay

      @Contract("_ -> this") @NotNull public @NotNull OpenToLANConfig eventCallDelay(@NotNull @NotNull Duration delay)
      Sets the delay between calls of ServerListPingEvent.
      Parameters:
      delay - the delay
      Returns:
      this, for chaining