Class ExprSkriptPotionEffect

java.lang.Object
ch.njol.skript.lang.util.SimpleExpression<SkriptPotionEffect>
ch.njol.skript.expressions.base.EventValueExpression<SkriptPotionEffect>
org.skriptlang.skript.bukkit.potion.elements.expressions.ExprSkriptPotionEffect
All Implemented Interfaces:
Debuggable, DefaultExpression<SkriptPotionEffect>, EventRestrictedSyntax, Expression<SkriptPotionEffect>, Loopable<SkriptPotionEffect>, Simplifiable<Expression<? extends SkriptPotionEffect>>, SyntaxElement, RuntimeErrorProducer, SyntaxRuntimeErrorProducer

@Name("Created Potion Effect") @Description("An expression to obtain the potion effect being made in a potion effect creation section.") @Example("set {_potion} to a potion effect of speed 2 for 10 minutes:\n\thide the effect\'s icon\n\thide the effect\'s particles\n") @Since("2.14") public class ExprSkriptPotionEffect extends ch.njol.skript.expressions.base.EventValueExpression<SkriptPotionEffect> implements EventRestrictedSyntax
  • Constructor Details

    • ExprSkriptPotionEffect

      public ExprSkriptPotionEffect()
  • Method Details

    • register

      public static void register(SyntaxRegistry registry, Origin origin)
    • supportedEvents

      public Class<? extends org.bukkit.event.Event>[] supportedEvents()
      Description copied from interface: EventRestrictedSyntax
      Returns all supported events for this syntax element.

      Before SyntaxElement.init(Expression[], int, Kleenean, SkriptParser.ParseResult) is called, checks to see if the current event is supported by this syntax element. If it is not, an error will be printed and the syntax element will not be initialised.

      Specified by:
      supportedEvents in interface EventRestrictedSyntax
      Returns:
      All supported event classes.
      See Also:
    • toString

      public String toString(@Nullable @Nullable org.bukkit.event.Event event, boolean debug)
      Specified by:
      toString in interface Debuggable
      Overrides:
      toString in class ch.njol.skript.expressions.base.EventValueExpression<SkriptPotionEffect>
      Parameters:
      event - The event to get information from. This is always null if debug == false.
      debug - If true this should print more information, if false this should print what is shown to the end user
      Returns:
      String representation of this object