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`

public class PotionEffectTypeWrapper extends PotionEffectType

## 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, 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

Constructors
Modifier
Constructor
Description
`protected`
`PotionEffectTypeWrapper(int id, @NotNull String name)`

## Method Summary

Modifier and Type
Method
Description
`double`
`getAttributeModifierAmount(Attribute attribute, int effectAmplifier)`
Gets the true modifier amount based on the effect amplifier.
`@NotNull Color`
`getColor()`
Returns the color of this effect type.
`double`
`getDurationModifier()`
Returns the duration modifier applied to effects of this type.
`Map<Attribute,AttributeModifier>`
`getEffectAttributes()`
Gets the effect attributes in an immutable map.
`PotionEffectType.Category`
`getEffectCategory()`
Gets the category of this effect
`NamespacedKey`
`getKey()`
Return the namespaced identifier for this object.
`@NotNull String`
`getName()`
Returns the name of this effect type.
`@NotNull PotionEffectType`
`getType()`
Get the potion type bound to this wrapper.
`boolean`
`isInstant()`
Returns whether the effect of this type happens once, immediately.
`@NotNull String`
`translationKey()`
Gets the translation key.

### Methods inherited from class org.bukkit.potion.PotionEffectType

`createEffect, equals, getById, getByKey, getByName, getId, hashCode, registerPotionEffectType, stopAcceptingRegistrations, toString, values`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface org.bukkit.Keyed

`key`

## Constructor Details

### PotionEffectTypeWrapper

protected PotionEffectTypeWrapper(int id, @NotNull @NotNull String name)

## 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 class `PotionEffectType`
Returns:
  duration modifier

### getName

@NotNull public @NotNull String getName()
Description copied from class: `PotionEffectType`
Returns the name of this effect type.

Specified by:
  `getName` in class `PotionEffectType`
Returns:
  The name of this effect type

### getType

@NotNull public @NotNull PotionEffectType 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 class `PotionEffectType`
Returns:
  whether this type is normally instant

### getColor

@NotNull public @NotNull Color getColor()
Description copied from class: `PotionEffectType`
Returns the color of this effect type.

Specified by:
  `getColor` in class `PotionEffectType`
Returns:
  the color

### getKey

@NotNull public NamespacedKey getKey()
Description copied from interface: `Keyed`
Return the namespaced identifier for this object.

Specified by:
  `getKey` in interface `Keyed`
Overrides:
  `getKey` in class `PotionEffectType`
Returns:
  this object's key

### getEffectAttributes

@NotNull public Map<Attribute,AttributeModifier> getEffectAttributes()
Description copied from class: `PotionEffectType`
Gets the effect attributes in an immutable map.

Specified by:
  `getEffectAttributes` in class `PotionEffectType`
Returns:
  the attribute map

### getAttributeModifierAmount

public double getAttributeModifierAmount(@NotNull Attribute attribute, int effectAmplifier)
Description copied from class: `PotionEffectType`
Gets the true modifier amount based on the effect amplifier.

Specified by:
  `getAttributeModifierAmount` in class `PotionEffectType`
Parameters:
  `attribute` - the attribute
  `effectAmplifier` - the effect amplifier (0 indexed)
Returns:
  the modifier amount

### getEffectCategory

@NotNull public PotionEffectType.Category getEffectCategory()
Description copied from class: `PotionEffectType`
Gets the category of this effect

Specified by:
  `getEffectCategory` in class `PotionEffectType`
Returns:
  the category

### translationKey

@NotNull public @NotNull String translationKey()
Description copied from interface: `net.kyori.adventure.translation.Translatable`
Gets the translation key.

Returns:
  the translation key