Enum Class PunishmentType

java.lang.Object
java.lang.Enum<PunishmentType>
dev.plex.api.punishment.PunishmentType
All Implemented Interfaces:
Serializable, Comparable<PunishmentType>, Constable

public enum PunishmentType extends Enum<PunishmentType>
Supported punishment types exposed through the API.
  • Enum Constant Details

    • MUTE

      public static final PunishmentType MUTE
      Prevents chat or other messaging actions.
    • FREEZE

      public static final PunishmentType FREEZE
      Freezes player movement.
    • BAN

      public static final PunishmentType BAN
      Bans a player for the standard 24-hour duration.
    • TEMPBAN

      public static final PunishmentType TEMPBAN
      Temporarily bans a player until an end date.
    • KICK

      public static final PunishmentType KICK
      Kicks a player from the server.
    • SMITE

      public static final PunishmentType SMITE
      Applies the smite action to a player.
  • Field Details

    • STANDARD_BAN_DURATION

      public static final Duration STANDARD_BAN_DURATION
      Standard duration used by BAN.
  • Method Details

    • values

      public static PunishmentType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static PunishmentType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • requiresEndDate

      public boolean requiresEndDate()
      Whether this punishment must have a future end date.
    • startsActive

      public boolean startsActive()
      Whether a newly-created punishment represents ongoing state.
    • fixedDuration

      public Optional<Duration> fixedDuration()
      A duration enforced for this type, regardless of a caller-supplied end date.
    • maximumDuration

      public Optional<Duration> maximumDuration()
      The longest permitted duration for this type, if it has a limit.
    • isBan

      public boolean isBan()
      Whether this is a finite ban punishment.