Enum Class PunishmentType
- All Implemented Interfaces:
Serializable, Comparable<PunishmentType>, Constable
Supported punishment types exposed through the API.
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum Constants -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionA duration enforced for this type, regardless of a caller-supplied end date.booleanisBan()Whether this is a finite ban punishment.The longest permitted duration for this type, if it has a limit.booleanWhether this punishment must have a future end date.booleanWhether a newly-created punishment represents ongoing state.static PunishmentTypeReturns the enum constant of this class with the specified name.static PunishmentType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
MUTE
Prevents chat or other messaging actions. -
FREEZE
Freezes player movement. -
BAN
Bans a player for the standard 24-hour duration. -
TEMPBAN
Temporarily bans a player until an end date. -
KICK
Kicks a player from the server. -
SMITE
Applies the smite action to a player.
-
-
Field Details
-
STANDARD_BAN_DURATION
-
-
Method Details
-
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
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 nameNullPointerException- 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
-
maximumDuration
-
isBan
public boolean isBan()Whether this is a finite ban punishment.
-