Interface Ban.Builder
- All Superinterfaces:
- AbstractBuilder<Ban>,- Builder<Ban,,- Ban.Builder> - CopyableBuilder<Ban,,- Ban.Builder> - ResettableBuilder<Ban,- Ban.Builder> 
- Enclosing interface:
- Ban
public static interface Ban.Builder
extends Builder<Ban,Ban.Builder>, CopyableBuilder<Ban,Ban.Builder>  
Represents a builder that creates bans.
- 
Method SummaryModifier and TypeMethodDescriptionaddress(InetAddress address) Sets the IP address to be banned.build()Creates a new Ban from this builder.expirationDate(@Nullable Instant instant) Sets the expiration date of the ban, or removes it.profile(GameProfile profile) Sets the profile to be banned.Sets the reason for the ban.Sets the source of the ban as aComponent, or removes it ifnullis passed in.Sets the date that the ban starts.default Ban.BuilderSets the type of the ban.Sets the type of the ban.Methods inherited from interface org.spongepowered.api.util.CopyableBuilderfrom
- 
Method Details- 
profileSets the profile to be banned.This can only be done if the BanTypehas been set toBanTypes.PROFILE.- Parameters:
- profile- The profile
- Returns:
- This builder
 
- 
addressSets the IP address to be banned.This can only be done if the BanTypehas been set toBanTypes.IP.- Parameters:
- address- The IP address
- Returns:
- This builder
 
- 
typeSets the type of the ban.- Parameters:
- type- The type to be set
- Returns:
- This builder
 
- 
typeSets the type of the ban.- Parameters:
- type- The type to be set
- Returns:
- This builder
 
- 
reasonSets the reason for the ban.If the specified reason is null, or not provided, then the reason will be be available on the created ban.- Parameters:
- reason- The reason
- Returns:
- This builder
 
- 
startDateSets the date that the ban starts.- Parameters:
- instant- The start date
- Returns:
- This builder
 
- 
expirationDateSets the expiration date of the ban, or removes it.- Parameters:
- instant- The expiration date, or null in order to remove it
- Returns:
- This builder
 
- 
sourceSets the source of the ban as aComponent, or removes it ifnullis passed in.- Parameters:
- source- The source of the ban, or- null
- Returns:
- This builder
 
- 
buildBan build()Creates a new Ban from this builder.- Specified by:
- buildin interface- AbstractBuilder<Ban>
- Returns:
- A new Ban
 
 
-