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 Type
    Method
    Description
    static org.bukkit.potion.PotionEffectType
     
    org.bukkit.Color
     
    double
     
    getEffect(org.bukkit.potion.PotionEffectType type)
    Get a GlowPotionEffect from a PotionEffectType if possible.
     
    Returns the vanilla id of a PotionEffect.
    static List<String>
     
    boolean
     
    static org.bukkit.potion.PotionEffectType
    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 all potion effect types with PotionEffectType.

    Methods inherited from class org.bukkit.potion.PotionEffectType

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

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Method Details

    • register

      public static void register()
      Register all potion effect types with PotionEffectType.
    • getEffect

      public static GlowPotionEffect getEffect(org.bukkit.potion.PotionEffectType type)
      Get a GlowPotionEffect from a PotionEffectType if possible.
      Parameters:
      type - The PotionEffectType.
      Returns:
      The associated GlowPotionEffect, or null.
    • parsePotionEffectId

      public static org.bukkit.potion.PotionEffectType parsePotionEffectId(String effectName)
      Parses a PotionEffect id or name if possible.
      Parameters:
      effectName - The PotionEffectType name.
      Returns:
      The associated PotionEffectType, or null.
    • getByVanillaId

      public static org.bukkit.potion.PotionEffectType getByVanillaId(String vanillaId)
    • getVanillaIds

      public static List<String> getVanillaIds()
    • getName

      public String getName()
      Specified by:
      getName in class org.bukkit.potion.PotionEffectType
    • getVanillaId

      public String getVanillaId()
      Returns the vanilla id of a PotionEffect.
      Returns:
      The vanilla id.
    • isInstant

      public boolean isInstant()
      Specified by:
      isInstant in class org.bukkit.potion.PotionEffectType
    • getColor

      public org.bukkit.Color getColor()
      Specified by:
      getColor in class org.bukkit.potion.PotionEffectType
    • getDurationModifier

      public double getDurationModifier()
      Specified by:
      getDurationModifier in class org.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.