Enum Class RadiationSymptom
java.lang.Object
java.lang.Enum<RadiationSymptom>
io.github.thebusybiscuit.slimefun4.core.attributes.RadiationSymptom
- All Implemented Interfaces:
Serializable
,Comparable<RadiationSymptom>
,Constable
An enum of potential radiation symptoms.
A symptom will be applied when the minExposure
threshold is reached on the
Player
's
exposure level.
When the Player
gets above the minExposure threshold
the PotionEffect
will be applied.- Author:
- Semisol
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
This method applies the symptom to a player.boolean
shouldApply
(int exposure) This method returns if this symptom should be applied.static RadiationSymptom
Returns the enum constant of this class with the specified name.static RadiationSymptom[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SLOW
-
WITHER_LOW
-
BLINDNESS
-
WITHER_HIGH
-
IMMINENT_DEATH
-
-
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
-
apply
This method applies the symptom to a player.- Parameters:
p
- The player
-
shouldApply
public boolean shouldApply(int exposure) This method returns if this symptom should be applied.- Parameters:
exposure
- Exposure level- Returns:
- If the symptom should be applied
-