Enum Class Category
- All Implemented Interfaces:
Serializable
,Comparable<Category>
,Constable
Represents the category of a punishment.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescription -
Method Summary
Modifier and TypeMethodDescriptionstatic Category
getFromName
(String name) Gets aCategory
from its name.getId()
Gets the category id used internally.getLocalizedName
(LanguageConfiguration languageConfiguration) Gets the user-friendly name specified in the configuration file.getNames()
Gets all the category names.static void
loadLocalizedValues
(LanguageConfiguration lang, ILogger logger) toString()
static Category
Returns the enum constant of this class with the specified name.static Category[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
BOTTING
-
BULLYING
-
DOXING
-
EXCESSIVE_BLAMING
-
EXPLOITING_MECHANICS
-
EXTREMISM
-
FARMING
-
GRIEFING_PLAYERS
-
GRIEFING_SERVER_OR_STAFF
-
GROOMING
-
HACKING
-
HOMOPHOBIA
-
HOSTILITY
-
IDENTITY_THEFT
-
INAPPROPRIATE_CONTENT
-
IRL_TRADES
-
MOBBING
-
OTHER
-
PAYMENT_DISPUTE
-
PUNISHMENT_EVASION
-
RACISM
-
RELENTLESS_MSG
-
SABOTAGING
-
SCAMMING
-
SELF__BAN_REQUEST
-
SELF__HARM_OTHERS
-
SELF__HARM_SELF
-
SEXISM
-
SEXUAL_MISCONDUCT
-
SMURFING
-
SPAMMING
-
STAFF_IMPERSONATION
-
STAFF_ABUSING_POWER
-
STALKING
-
SWATTING
-
SWEARING
-
TROLLING
-
VIOLENT_THREAT
-
XENOPHOBIA
-
-
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
-
loadLocalizedValues
-
getFromId
- Parameters:
id
- the category id- Returns:
- the category or an empty optional if the given id is invalid
- See Also:
-
getFromIdOrThrow
- Parameters:
id
- the category id- Returns:
- the category or it throws a
IllegalArgumentException
- See Also:
-
getFromName
Gets aCategory
from its name. This name might be different from the localized namegetLocalizedName(LanguageConfiguration)
. It's lowercase and doesn't contain spaces.- Parameters:
name
- the category name- Returns:
- the category or an empty optional if the given name is invalid
-
getNames
Gets all the category names. These names might be different from the localized names (LanguageConfiguration.getCategoryToLocalizedName()
). They are lowercase and don't contain spaces.- Returns:
- the list of names
-
getId
Gets the category id used internally.- Returns:
- the unique category id
-
getLocalizedName
Gets the user-friendly name specified in the configuration file.- Parameters:
languageConfiguration
- the language config instance- Returns:
- the localized category name
-
toString
-