Class ExprSecPotionEffect
java.lang.Object
ch.njol.skript.lang.util.SimpleExpression<SkriptPotionEffect>
ch.njol.skript.expressions.base.SectionExpression<SkriptPotionEffect>
org.skriptlang.skript.bukkit.potion.elements.expressions.ExprSecPotionEffect
- All Implemented Interfaces:
Debuggable,Expression<SkriptPotionEffect>,Loopable<SkriptPotionEffect>,Simplifiable<Expression<? extends SkriptPotionEffect>>,SyntaxElement,RuntimeErrorProducer,SyntaxRuntimeErrorProducer
@Name("New Potion Effect")
@Description("Create a new potion effect that can be applied to an entity or item type.")
@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") @Example("add strength 5 to the potion effects of the player\'s tool") @Example("apply invisibility to the player for 5 minutes:\n\thide the effect\'s particles\n") @Example("add a potion effect of speed 1 to the potion effects of the player") @Example("# creates a potion effect with the properties of an existing potion effect\nset {_potion} to a potion effect of slowness based on the player\'s speed effect\n")
@Since({"2.5.2","INSERT VERSION (syntax changes, infinite duration support)"})
public class ExprSecPotionEffect
extends ch.njol.skript.expressions.base.SectionExpression<SkriptPotionEffect>
-
Field Summary
Fields inherited from class ch.njol.skript.expressions.base.SectionExpression
section -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected SkriptPotionEffect[]get(org.bukkit.event.Event event) This is the internal method to get an expression's values.
To get the expression's value from the outside useSimpleExpression.getSingle(Event)orSimpleExpression.getArray(Event).Class<? extends SkriptPotionEffect> Gets the return type of this expression.booleaninit(Expression<?>[] expressions, int matchedPattern, Kleenean delayed, SkriptParser.ParseResult parseResult, @Nullable SectionNode sectionNode, @Nullable List<TriggerItem> triggerItems) booleanisSingle()static voidregister(SyntaxRegistry registry, Origin origin) toString(@Nullable org.bukkit.event.Event event, boolean debug) Methods inherited from class ch.njol.skript.expressions.base.SectionExpression
getAsSection, init, isSectionOnly, loadCode, loadCode, loadCode, loadOptionalCode, runSection, setTriggerItemsMethods inherited from class ch.njol.skript.lang.util.SimpleExpression
acceptChange, change, check, check, check, getAll, getAnd, getArray, getConvertedExpr, getConvertedExpression, getNode, getSingle, getSource, getTime, isDefault, isLoopOf, iterator, preInit, setTime, setTime, setTime, setTime, setTime, simplify, supportsLoopPeeking, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface ch.njol.skript.lang.Expression
beforeChange, canBeSingle, canReturn, changeInPlace, changeInPlace, getAcceptedChangeModes, getOptionalSingle, getSyntaxTypeName, possibleReturnTypes, returnNestedStructures, returnsNestedStructures, stream, streamAllMethods inherited from interface org.skriptlang.skript.log.runtime.RuntimeErrorProducer
error, error, getRuntimeErrorManager, warning, warningMethods inherited from interface ch.njol.skript.lang.SyntaxElement
getParserMethods inherited from interface org.skriptlang.skript.log.runtime.SyntaxRuntimeErrorProducer
getErrorSource
-
Constructor Details
-
ExprSecPotionEffect
public ExprSecPotionEffect()
-
-
Method Details
-
register
-
init
public boolean init(Expression<?>[] expressions, int matchedPattern, Kleenean delayed, SkriptParser.ParseResult parseResult, @Nullable @Nullable SectionNode sectionNode, @Nullable @Nullable List<TriggerItem> triggerItems) - Specified by:
initin classch.njol.skript.expressions.base.SectionExpression<SkriptPotionEffect>
-
get
Description copied from class:SimpleExpressionThis is the internal method to get an expression's values.
To get the expression's value from the outside useSimpleExpression.getSingle(Event)orSimpleExpression.getArray(Event).- Specified by:
getin classSimpleExpression<SkriptPotionEffect>- Parameters:
event- The event with which this expression is evaluated.- Returns:
- An array of values for this event. May not contain nulls.
-
isSingle
public boolean isSingle()- Returns:
- true if this expression will ever only return one value at most, false if it can return multiple values.
-
getReturnType
Description copied from interface:ExpressionGets 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 byExpression.getArray(Event)
-
toString
- 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
-