Interface DraftSanction
- All Superinterfaces:
EnforcementOptionsFactory, SanctionBase
- All Known Subinterfaces:
CalculablePunishment, DraftPunishment
A punishment ready to be created through some means
-
Method Summary
Modifier and TypeMethodDescriptiondefault space.arim.omnibus.util.concurrent.ReactionStage<Optional<Punishment>> Enacts this sanction, adding it to the database as a punishment, then enforces it.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.booleanWhether this draft sanction is equal to another.Methods inherited from interface EnforcementOptionsFactory
enforcementOptionsBuilderMethods inherited from interface SanctionBase
getOperator, getVictim
-
Method Details
-
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. Seespace.arim.libertybans.api.punishfor 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. Seespace.arim.libertybans.api.punishfor 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
-