Package dev.qixils.crowdcontrol.builder
Interface CrowdControlBuilder
-
- All Known Implementing Classes:
CrowdControlClientBuilder,CrowdControlServerBuilder
public interface CrowdControlBuilderBuilds a newCrowdControlinstance.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @NotNull CrowdControlbuild()Builds a newCrowdControlinstance using the provided variables.@NotNull CrowdControlBuilderport(int port)Sets the port that will be used by the Crowd Control client or server.
-
-
-
Method Detail
-
port
@CheckReturnValue @NotNull @Contract("_ -> this") @NotNull CrowdControlBuilder port(int port) throws IllegalArgumentExceptionSets the port that will be used by the Crowd Control client or server.- Parameters:
port- port to listen on- Returns:
- this builder
- Throws:
IllegalArgumentException- the port was outside the expected bounds of [1,65536]
-
build
@CheckReturnValue @NotNull @Contract("-> new") @NotNull CrowdControl build() throws IllegalStateExceptionBuilds a newCrowdControlinstance using the provided variables.- Returns:
- new CrowdControl instance
- Throws:
IllegalStateException-port(int)was not called
-
-