public static interface Ban.Builder extends ResettableBuilder<Ban,Ban.Builder>
| Modifier and Type | Method and Description |
|---|---|
Ban.Builder |
address(InetAddress address)
Sets the IP address to be banned.
|
Ban |
build()
Creates a new Ban from this builder.
|
Ban.Builder |
expirationDate(Instant instant)
Sets the expiration date of the ban, or removes it.
|
Ban.Builder |
profile(GameProfile profile)
Sets the profile to be banned.
|
Ban.Builder |
reason(Text reason)
Sets the reason for the ban.
|
Ban.Builder |
source(CommandSource source)
Sets the source of the ban, or removes it if
null is passed
in. |
Ban.Builder |
source(Text source)
Sets the source of the ban as a
Text, or removes it if
null is passed in. |
Ban.Builder |
startDate(Instant instant)
Sets the date that the ban starts.
|
Ban.Builder |
type(BanType type)
Sets the type of the ban.
|
from, resetBan.Builder profile(GameProfile profile)
This can only be done if the BanType has been set to BanTypes.PROFILE.
profile - The profileBan.Builder address(InetAddress address)
This can only be done if the BanType has been set to BanTypes.IP.
address - The IP addressBan.Builder type(BanType type)
type - The type to be setBan.Builder reason(@Nullable Text reason)
If the specified reason is null, or not provided,
then the reason will be be available on the created ban.
reason - The reasonBan.Builder startDate(Instant instant)
instant - The start dateBan.Builder expirationDate(@Nullable Instant instant)
instant - The expiration date, or null in order to remove itBan.Builder source(@Nullable CommandSource source)
null is passed
in.source - The source of the ban, or nullBan.Builder source(@Nullable Text source)
Text, or removes it if
null is passed in.source - The source of the ban, or nullBan build()