Package net.glowstone.constants
Class GlowPotionEffect
java.lang.Object
org.bukkit.potion.PotionEffectType
net.glowstone.constants.GlowPotionEffect
- All Implemented Interfaces:
net.kyori.adventure.key.Keyed
,net.kyori.adventure.translation.Translatable
,org.bukkit.Keyed
public final class GlowPotionEffect
extends org.bukkit.potion.PotionEffectType
Definitions of potion effect types.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.potion.PotionEffectType
org.bukkit.potion.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
-
Method Summary
Modifier and TypeMethodDescriptiondouble
getAttributeModifierAmount
(@NotNull org.bukkit.attribute.Attribute attribute, int effectAmplifier) static org.bukkit.potion.PotionEffectType
getByVanillaId
(String vanillaId) org.bukkit.Color
getColor()
double
static GlowPotionEffect
getEffect
(org.bukkit.potion.PotionEffectType type) Get a GlowPotionEffect from a PotionEffectType if possible.@NotNull Map<org.bukkit.attribute.Attribute,
org.bukkit.attribute.AttributeModifier> @NotNull org.bukkit.potion.PotionEffectType.Category
getName()
org.bukkit.NamespacedKey
Returns the vanilla id of a PotionEffect.boolean
static org.bukkit.potion.PotionEffectType
parsePotionEffectId
(String effectName) Parses a PotionEffect id or name if possible.void
pulse
(org.bukkit.entity.LivingEntity entity, org.bukkit.potion.PotionEffect effect) Pulse this potion effect on a specified entity.static void
register()
Register all potion effect types with PotionEffectType.@NotNull String
Methods inherited from class org.bukkit.potion.PotionEffectType
createEffect, equals, getById, getByKey, getByName, getId, getKey, 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
-
Method Details
-
register
public static void register()Register all potion effect types with PotionEffectType. -
getEffect
Get a GlowPotionEffect from a PotionEffectType if possible.- Parameters:
type
- The PotionEffectType.- Returns:
- The associated GlowPotionEffect, or null.
-
parsePotionEffectId
Parses a PotionEffect id or name if possible.- Parameters:
effectName
- The PotionEffectType name.- Returns:
- The associated PotionEffectType, or null.
-
getByVanillaId
-
getVanillaIds
-
getName
- Specified by:
getName
in classorg.bukkit.potion.PotionEffectType
-
getVanillaId
public org.bukkit.NamespacedKey getVanillaId()Returns the vanilla id of a PotionEffect.- Returns:
- The vanilla id.
-
isInstant
public boolean isInstant()- Specified by:
isInstant
in classorg.bukkit.potion.PotionEffectType
-
getColor
public org.bukkit.Color getColor()- Specified by:
getColor
in classorg.bukkit.potion.PotionEffectType
-
getEffectAttributes
@NotNull public @NotNull Map<org.bukkit.attribute.Attribute,org.bukkit.attribute.AttributeModifier> getEffectAttributes()- Specified by:
getEffectAttributes
in classorg.bukkit.potion.PotionEffectType
-
getAttributeModifierAmount
public double getAttributeModifierAmount(@NotNull @NotNull org.bukkit.attribute.Attribute attribute, int effectAmplifier) - Specified by:
getAttributeModifierAmount
in classorg.bukkit.potion.PotionEffectType
-
getEffectCategory
@NotNull public @NotNull org.bukkit.potion.PotionEffectType.Category getEffectCategory()- Specified by:
getEffectCategory
in classorg.bukkit.potion.PotionEffectType
-
getDurationModifier
public double getDurationModifier()- Specified by:
getDurationModifier
in classorg.bukkit.potion.PotionEffectType
-
pulse
public void pulse(org.bukkit.entity.LivingEntity entity, org.bukkit.potion.PotionEffect effect) Pulse this potion effect on a specified entity.If the potion effect is not applicable, nothing happens. For instant effects, will only have an effect if 'ticks' is 0.
- Parameters:
entity
- The entity to pulse on.effect
- Information on the effect's state.
-
translationKey
-