java.lang.Object
net.minestom.server.extras.lan.OpenToLANConfig
Configuration for opening the server to LAN.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates 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 Summary
Modifier and TypeMethodDescriptioneventCallDelay
(Duration delay) Sets the delay between calls ofServerListPingEvent
.Sets the delay between outgoing pings.port
(int port) Sets the port used to send pings from.
-
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
Sets the port used to send pings from. Use0
to pick a random free port.- Parameters:
port
- the port- Returns:
this
, for chaining
-
pingDelay
Sets the delay between outgoing pings.- Parameters:
delay
- the delay- Returns:
this
, for chaining
-
eventCallDelay
Sets the delay between calls ofServerListPingEvent
.- Parameters:
delay
- the delay- Returns:
this
, for chaining
-