Interface DraftSanction

All Superinterfaces:
EnforcementOptionsFactory, SanctionBase
All Known Subinterfaces:
CalculablePunishment, DraftPunishment

public interface DraftSanction extends SanctionBase, EnforcementOptionsFactory
A punishment ready to be created through some means
  • Method Details

    • enactPunishment

      default space.arim.omnibus.util.concurrent.ReactionStage<Optional<Punishment>> enactPunishment()
      Enacts this sanction, adding it to the database as a punishment, then enforces it.

      If the punishment type is a ban or mute, and there is already an active ban or mute for the victim, the future will yield an empty optional. See space.arim.libertybans.api.punish for a description of active and historical punishments.
      Returns:
      a future which yields the punishment or an empty optional if there was a conflict
    • enactPunishment

      space.arim.omnibus.util.concurrent.ReactionStage<Optional<Punishment>> enactPunishment(EnforcementOptions enforcementOptions)
      Enacts this sanction, adding it to the database as a punishment, then enforces it according to the given options.

      If the punishment type is a ban or mute, and there is already an active ban or mute for the victim, the future will yield an empty optional. See space.arim.libertybans.api.punish for a description of active and historical punishments.
      Parameters:
      enforcementOptions - the enforcement options. Can be used to disable enforcement entirely
      Returns:
      a future which yields the punishment or an empty optional if there was a conflict
    • equals

      boolean equals(Object object)
      Whether this draft sanction is equal to another. The other draft sanction must have the same details as this one
      Overrides:
      equals in class Object
      Parameters:
      object - the object to determine equality with
      Returns:
      true if equal, false otherwise