Interface DraftSanctionBuilder<B extends DraftSanctionBuilder<B,D> , D extends DraftSanction>
- All Known Subinterfaces:
CalculablePunishmentBuilder, DraftPunishmentBuilder
public interface DraftSanctionBuilder<B extends DraftSanctionBuilder<B,D>, D extends DraftSanction>
-
Method Summary
-
Method Details
-
victim
Sets the victim of this builder to the specified one. Required operation.
If the victim is aCompositeVictim, it cannot use eitherCompositeVictim.WILDCARD_UUIDorCompositeVictim.WILDCARD_ADDRESS- Parameters:
victim- the victim of the punishmnt- Returns:
- this builder
- Throws:
IllegalArgumentException- if the victim is aCompositeVictimand uses eitherWILDCARD_UUIDorWILDCARD_ADDRESS
-
operator
Sets the operator of this builder to the specified one. If unspecified, the console operator is used (ConsoleOperator.INSTANCE)- Parameters:
operator- the operator of the punishment, by default the console- Returns:
- this builder
-
build
D build()Builds into a full draft sanction. All the required information must be set on this builder.
May be used repeatedly without side effects.- Returns:
- a draft sanction from this builder's details
- Throws:
IllegalStateException- if any of the required details on this builder are not set
-