Package org.bukkit.potion
Class PotionEffectTypeWrapper
java.lang.Object
org.bukkit.potion.PotionEffectType
org.bukkit.potion.PotionEffectTypeWrapper
- All Implemented Interfaces:
net.kyori.adventure.key.Keyed
,Translatable
,Keyed
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.potion.PotionEffectType
PotionEffectType.Category
-
Field Summary
Fields inherited from class org.bukkit.potion.PotionEffectType
ABSORPTION, BAD_OMEN, BLINDNESS, CONDUIT_POWER, CONFUSION, DAMAGE_RESISTANCE, DARKNESS, DOLPHINS_GRACE, FAST_DIGGING, FIRE_RESISTANCE, GLOWING, HARM, HEAL, HEALTH_BOOST, HERO_OF_THE_VILLAGE, HUNGER, INCREASE_DAMAGE, INVISIBILITY, JUMP, LEVITATION, LUCK, NIGHT_VISION, POISON, REGENERATION, SATURATION, SLOW, SLOW_DIGGING, SLOW_FALLING, SPEED, UNLUCK, WATER_BREATHING, WEAKNESS, WITHER
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondouble
getAttributeModifierAmount
(Attribute attribute, int effectAmplifier) Gets the true modifier amount based on the effect amplifier.getColor()
Returns the color of this effect type.double
Returns the duration modifier applied to effects of this type.Gets the effect attributes in an immutable map.Gets the category of this effectgetKey()
Return the namespaced identifier for this object.getName()
Returns the name of this effect type.getType()
Get the potion type bound to this wrapper.boolean
Returns whether the effect of this type happens once, immediately.Gets the translation key.Methods inherited from class org.bukkit.potion.PotionEffectType
createEffect, equals, getById, getByKey, getByName, getId, hashCode, registerPotionEffectType, stopAcceptingRegistrations, toString, values
-
Constructor Details
-
PotionEffectTypeWrapper
-
-
Method Details
-
getDurationModifier
public double getDurationModifier()Description copied from class:PotionEffectType
Returns the duration modifier applied to effects of this type.- Specified by:
getDurationModifier
in classPotionEffectType
- Returns:
- duration modifier
-
getName
Description copied from class:PotionEffectType
Returns the name of this effect type.- Specified by:
getName
in classPotionEffectType
- Returns:
- The name of this effect type
-
getType
Get the potion type bound to this wrapper.- Returns:
- The potion effect type
-
isInstant
public boolean isInstant()Description copied from class:PotionEffectType
Returns whether the effect of this type happens once, immediately.- Specified by:
isInstant
in classPotionEffectType
- Returns:
- whether this type is normally instant
-
getColor
Description copied from class:PotionEffectType
Returns the color of this effect type.- Specified by:
getColor
in classPotionEffectType
- Returns:
- the color
-
getKey
Description copied from interface:Keyed
Return the namespaced identifier for this object.- Specified by:
getKey
in interfaceKeyed
- Overrides:
getKey
in classPotionEffectType
- Returns:
- this object's key
-
getEffectAttributes
Description copied from class:PotionEffectType
Gets the effect attributes in an immutable map.- Specified by:
getEffectAttributes
in classPotionEffectType
- Returns:
- the attribute map
-
getAttributeModifierAmount
Description copied from class:PotionEffectType
Gets the true modifier amount based on the effect amplifier.- Specified by:
getAttributeModifierAmount
in classPotionEffectType
- Parameters:
attribute
- the attributeeffectAmplifier
- the effect amplifier (0 indexed)- Returns:
- the modifier amount
-
getEffectCategory
Description copied from class:PotionEffectType
Gets the category of this effect- Specified by:
getEffectCategory
in classPotionEffectType
- Returns:
- the category
-
translationKey
Description copied from interface:net.kyori.adventure.translation.Translatable
Gets the translation key.- Returns:
- the translation key
-