Class NecrifyBan
java.lang.Object
de.jvstvshd.necrify.common.punishment.AbstractPunishment
de.jvstvshd.necrify.common.punishment.AbstractTemporalPunishment
de.jvstvshd.necrify.common.punishment.NecrifyBan
- All Implemented Interfaces:
de.jvstvshd.necrify.api.punishment.Ban,de.jvstvshd.necrify.api.punishment.Punishment,de.jvstvshd.necrify.api.punishment.TemporalPunishment,de.jvstvshd.necrify.api.punishment.util.ReasonHolder
public class NecrifyBan
extends AbstractTemporalPunishment
implements de.jvstvshd.necrify.api.punishment.Ban
-
Field Summary
Fields inherited from class de.jvstvshd.necrify.common.punishment.AbstractPunishment
APPLY_CANCELLATION, APPLY_CHANGE, APPLY_PUNISHMENT, APPLY_SUCCESSOR, APPLY_TIMESTAMP_UPDATE -
Constructor Summary
ConstructorsConstructorDescriptionNecrifyBan(de.jvstvshd.necrify.api.user.NecrifyUser user, net.kyori.adventure.text.Component reason, UUID punishmentUuid, de.jvstvshd.necrify.api.duration.PunishmentDuration duration, AbstractNecrifyPlugin plugin, de.jvstvshd.necrify.api.punishment.Punishment successor, LocalDateTime issuedAt) -
Method Summary
Modifier and TypeMethodDescriptionCompletableFuture<de.jvstvshd.necrify.api.punishment.Punishment> @NotNull net.kyori.adventure.text.ComponentcreateFullReason(@Nullable Locale locale) @NotNull de.jvstvshd.necrify.api.punishment.StandardPunishmentTypegetType()booleanMethods inherited from class de.jvstvshd.necrify.common.punishment.AbstractTemporalPunishment
applyCancellation, change, checkValidity, getDuration, isOngoing, isValid, setSuccessor, toString, totalDurationMethods inherited from class de.jvstvshd.necrify.common.punishment.AbstractPunishment
cancel, convertReason, equals, executeAsync, getCreationTime, getEventDispatcher, getExecutor, getMessageProvider, getPlugin, getPredecessor, getPunishmentUuid, getReason, getSuccessor, getUser, getUuid, hasBeenCreated, hashCode, hasSuccessor, punishMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface de.jvstvshd.necrify.api.punishment.Punishment
cancel, getCreationTime, getPredecessor, getPunishmentUuid, getSuccessor, getSuccessorOrNull, getUser, getUuid, hasBeenCreated, hasSuccessor, isOngoing, punish, setSuccessorMethods inherited from interface de.jvstvshd.necrify.api.punishment.util.ReasonHolder
getReasonMethods inherited from interface de.jvstvshd.necrify.api.punishment.TemporalPunishment
change, change, getDuration, totalDuration
-
Constructor Details
-
NecrifyBan
public NecrifyBan(de.jvstvshd.necrify.api.user.NecrifyUser user, net.kyori.adventure.text.Component reason, UUID punishmentUuid, de.jvstvshd.necrify.api.duration.PunishmentDuration duration, AbstractNecrifyPlugin plugin, de.jvstvshd.necrify.api.punishment.Punishment successor, LocalDateTime issuedAt)
-
-
Method Details
-
applyPunishment
public CompletableFuture<de.jvstvshd.necrify.api.punishment.Punishment> applyPunishment() throws de.jvstvshd.necrify.api.PunishmentException- Overrides:
applyPunishmentin classAbstractTemporalPunishment- Throws:
de.jvstvshd.necrify.api.PunishmentException
-
createFullReason
@NotNull public @NotNull net.kyori.adventure.text.Component createFullReason(@Nullable @Nullable Locale locale) - Specified by:
createFullReasonin interfacede.jvstvshd.necrify.api.punishment.util.ReasonHolder
-
isPermanent
public boolean isPermanent()- Specified by:
isPermanentin interfacede.jvstvshd.necrify.api.punishment.TemporalPunishment
-
getType
@NotNull public @NotNull de.jvstvshd.necrify.api.punishment.StandardPunishmentType getType()- Specified by:
getTypein interfacede.jvstvshd.necrify.api.punishment.Punishment- Specified by:
getTypein classAbstractTemporalPunishment
-