Class PotionWrapper

java.lang.Object
fr.andross.banitem.utils.potions.PotionWrapper

public final class PotionWrapper extends Object
A potion wrapper class that stores the Bukkit potion type with the level.
Version:
3.1
Author:
Andross
  • Constructor Summary

    Constructors
    Constructor
    Description
    PotionWrapper(@NotNull org.bukkit.potion.PotionEffectType potionEffectType, int level)
    Wrap a minecraft potion with its level, so it can easily be compared depending on the Minecraft version used.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    int
    Get the level of the potion effect.
    @NotNull org.bukkit.potion.PotionEffectType
    Get the PotionEffectType.
    int
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PotionWrapper

      public PotionWrapper(@NotNull @NotNull org.bukkit.potion.PotionEffectType potionEffectType, int level)
      Wrap a minecraft potion with its level, so it can easily be compared depending on the Minecraft version used.
      Parameters:
      potionEffectType - the Minecraft potion
      level - the potion level
  • Method Details

    • getPotionEffectType

      @NotNull public @NotNull org.bukkit.potion.PotionEffectType getPotionEffectType()
      Get the PotionEffectType.
      Returns:
      the PotionEffectType
    • getLevel

      public int getLevel()
      Get the level of the potion effect.
      Returns:
      the level of the potion effect
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object