Package net.glowstone.constants
Class GlowPotionEffect
java.lang.Object
org.bukkit.potion.PotionEffectType
net.glowstone.constants.GlowPotionEffect
public final class GlowPotionEffect
extends org.bukkit.potion.PotionEffectType
Definitions of potion effect types.
-
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
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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.getName()
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.Methods inherited from class org.bukkit.potion.PotionEffectType
createEffect, equals, getById, getByName, getId, hashCode, registerPotionEffectType, stopAcceptingRegistrations, toString, values
-
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
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
-
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.
-