mirror of
https://github.com/Minestom/Minestom.git
synced 2024-10-01 16:07:51 +02:00
Modify OpenToLANConfig method names
This commit is contained in:
parent
42933e58b0
commit
a43c0e1291
@ -34,7 +34,7 @@ public class OpenToLANConfig {
|
||||
* @return {@code this}, for chaining
|
||||
*/
|
||||
@Contract("_ -> this")
|
||||
public @NotNull OpenToLANConfig setPort(int port) {
|
||||
public @NotNull OpenToLANConfig port(int port) {
|
||||
this.port = port;
|
||||
return this;
|
||||
}
|
||||
@ -46,7 +46,7 @@ public class OpenToLANConfig {
|
||||
* @return {@code this}, for chaining
|
||||
*/
|
||||
@Contract("_ -> this")
|
||||
public @NotNull OpenToLANConfig setDelayBetweenPings(@NotNull UpdateOption delay) {
|
||||
public @NotNull OpenToLANConfig pingDelay(@NotNull UpdateOption delay) {
|
||||
this.delayBetweenPings = Objects.requireNonNull(delay, "delay");
|
||||
return this;
|
||||
}
|
||||
@ -58,7 +58,7 @@ public class OpenToLANConfig {
|
||||
* @return {@code this}, for chaining
|
||||
*/
|
||||
@Contract("_ -> this")
|
||||
public @NotNull OpenToLANConfig setDelayBetweenEventCalls(@NotNull UpdateOption delay) {
|
||||
public @NotNull OpenToLANConfig eventCallDelay(@NotNull UpdateOption delay) {
|
||||
this.delayBetweenEvent = Objects.requireNonNull(delay, "delay");
|
||||
return this;
|
||||
}
|
||||
|
@ -105,7 +105,7 @@ public class Main {
|
||||
//MojangAuth.init();
|
||||
|
||||
// useful for testing - we don't need to worry about event calls so just set this to a long time
|
||||
OpenToLAN.open(new OpenToLANConfig().setDelayBetweenEventCalls(new UpdateOption(1, TimeUnit.DAY)));
|
||||
OpenToLAN.open(new OpenToLANConfig().eventCallDelay(new UpdateOption(1, TimeUnit.DAY)));
|
||||
|
||||
minecraftServer.start("0.0.0.0", 25565);
|
||||
//Runtime.getRuntime().addShutdownHook(new Thread(MinecraftServer::stopCleanly));
|
||||
|
Loading…
Reference in New Issue
Block a user