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

    Modifier and Type
    Method
    Description
    Builds into a full draft sanction.
    operator(Operator operator)
    Sets the operator of this builder to the specified one.
    victim(Victim victim)
    Sets the victim of this builder to the specified one.
  • Method Details

    • victim

      B victim(Victim victim)
      Sets the victim of this builder to the specified one. Required operation.

      If the victim is a CompositeVictim, it cannot use either CompositeVictim.WILDCARD_UUID or CompositeVictim.WILDCARD_ADDRESS
      Parameters:
      victim - the victim of the punishmnt
      Returns:
      this builder
      Throws:
      IllegalArgumentException - if the victim is a CompositeVictim and uses either WILDCARD_UUID or WILDCARD_ADDRESS
    • operator

      B operator(Operator 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