Class ExprPotionEffectTypeCategory

java.lang.Object
ch.njol.skript.lang.util.SimpleExpression<org.bukkit.potion.PotionEffectTypeCategory>
ch.njol.skript.expressions.base.PropertyExpression<org.bukkit.potion.PotionEffectType, org.bukkit.potion.PotionEffectTypeCategory>
ch.njol.skript.expressions.base.SimplePropertyExpression<org.bukkit.potion.PotionEffectType, org.bukkit.potion.PotionEffectTypeCategory>
org.skriptlang.skript.bukkit.potion.elements.expressions.ExprPotionEffectTypeCategory
All Implemented Interfaces:
Debuggable, Expression<org.bukkit.potion.PotionEffectTypeCategory>, Loopable<org.bukkit.potion.PotionEffectTypeCategory>, Simplifiable<Expression<? extends org.bukkit.potion.PotionEffectTypeCategory>>, SyntaxElement, Converter<org.bukkit.potion.PotionEffectType, org.bukkit.potion.PotionEffectTypeCategory>, RuntimeErrorProducer, SyntaxRuntimeErrorProducer

@Name("Potion Effect Type Category") @Description({"An expression to obtain the category of a potion effect type.","That is, whether the potion effect type is beneficial, harmful, or neutral."}) @Example("on entity potion effect modification:\n\tif the potion effect type category is harmful:\n\t\t message \"You have been afflicted with %potion effect type%\"\n") @RequiredPlugins("Minecraft 1.21+") @Since("2.14") public class ExprPotionEffectTypeCategory extends ch.njol.skript.expressions.base.SimplePropertyExpression<org.bukkit.potion.PotionEffectType, org.bukkit.potion.PotionEffectTypeCategory>
  • Constructor Details

    • ExprPotionEffectTypeCategory

      public ExprPotionEffectTypeCategory()
  • Method Details

    • register

      public static void register(SyntaxRegistry registry)
    • convert

      @Nullable public @Nullable org.bukkit.potion.PotionEffectTypeCategory convert(org.bukkit.potion.PotionEffectType type)
      Description copied from interface: Converter
      Converts an object using this Converter.
      Specified by:
      convert in interface Converter<org.bukkit.potion.PotionEffectType, org.bukkit.potion.PotionEffectTypeCategory>
      Specified by:
      convert in class ch.njol.skript.expressions.base.SimplePropertyExpression<org.bukkit.potion.PotionEffectType, org.bukkit.potion.PotionEffectTypeCategory>
      Parameters:
      type - The object to convert.
      Returns:
      The converted object.
    • getReturnType

      public Class<? extends org.bukkit.potion.PotionEffectTypeCategory> getReturnType()
      Description copied from interface: Expression
      Gets the return type of this expression.
      Returns:
      A supertype of any objects returned by Expression.getSingle(Event) and the component type of any arrays returned by Expression.getArray(Event)
    • getPropertyName

      protected String getPropertyName()
      Specified by:
      getPropertyName in class ch.njol.skript.expressions.base.SimplePropertyExpression<org.bukkit.potion.PotionEffectType, org.bukkit.potion.PotionEffectTypeCategory>