Class Potion

java.lang.Object
com.marcusslover.plus.lib.potion.Potion
All Implemented Interfaces:
IApplicable<org.bukkit.entity.LivingEntity,Potion>

public class Potion extends Object implements IApplicable<org.bukkit.entity.LivingEntity,Potion>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected int
     
    protected int
     
    protected boolean
     
    protected boolean
     
    protected boolean
     
    protected boolean
     
    protected @NotNull org.bukkit.potion.PotionEffectType
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull Potion
    apply(@NotNull org.bukkit.entity.LivingEntity entity)
     
    static @NotNull Potion
    of(@NotNull org.bukkit.potion.PotionEffectType type)
     
    static @NotNull Potion
    of(@NotNull org.bukkit.potion.PotionEffectType type, int durationTicks, int amplifier)
     
    static @NotNull Potion
    of(@NotNull org.bukkit.potion.PotionEffectType type, int durationTicks, int amplifier, boolean particles)
     
    static @NotNull Potion
    of(@NotNull org.bukkit.potion.PotionEffectType type, int durationTicks, int amplifier, boolean particles, boolean transparent)
     
    static @NotNull Potion
    of(@NotNull org.bukkit.potion.PotionEffectType type, int durationTicks, int amplifier, boolean particles, boolean transparent, boolean icon)
     
    static @NotNull Potion
    of(@NotNull org.bukkit.potion.PotionEffectType type, int durationTicks, int amplifier, boolean particles, boolean transparent, boolean icon, boolean force)
     
    @NotNull org.bukkit.potion.PotionEffect
    Converts this potion to a PotionEffect.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.marcusslover.plus.lib.common.IApplicable

    apply, apply, sendAll, sendAll, sendAll
  • Field Details

    • type

      @NotNull protected @NotNull org.bukkit.potion.PotionEffectType type
    • duration

      protected int duration
    • amplifier

      protected int amplifier
    • particles

      protected boolean particles
    • transparent

      protected boolean transparent
    • icon

      protected boolean icon
    • force

      protected boolean force
  • Constructor Details

    • Potion

      public Potion()
  • Method Details

    • of

      @NotNull public static @NotNull Potion of(@NotNull @NotNull org.bukkit.potion.PotionEffectType type)
    • of

      @NotNull public static @NotNull Potion of(@NotNull @NotNull org.bukkit.potion.PotionEffectType type, int durationTicks, int amplifier)
    • of

      @NotNull public static @NotNull Potion of(@NotNull @NotNull org.bukkit.potion.PotionEffectType type, int durationTicks, int amplifier, boolean particles)
    • of

      @NotNull public static @NotNull Potion of(@NotNull @NotNull org.bukkit.potion.PotionEffectType type, int durationTicks, int amplifier, boolean particles, boolean transparent)
    • of

      @NotNull public static @NotNull Potion of(@NotNull @NotNull org.bukkit.potion.PotionEffectType type, int durationTicks, int amplifier, boolean particles, boolean transparent, boolean icon)
    • of

      @NotNull public static @NotNull Potion of(@NotNull @NotNull org.bukkit.potion.PotionEffectType type, int durationTicks, int amplifier, boolean particles, boolean transparent, boolean icon, boolean force)
    • potionEffect

      @NotNull public @NotNull org.bukkit.potion.PotionEffect potionEffect()
      Converts this potion to a PotionEffect.
      Returns:
      the potion effect
    • apply

      @NotNull public @NotNull Potion apply(@NotNull @NotNull org.bukkit.entity.LivingEntity entity)
      Specified by:
      apply in interface IApplicable<org.bukkit.entity.LivingEntity,Potion>