Package ch.njol.skript.lang.function
Class ScriptFunction<T>
java.lang.Object
ch.njol.skript.lang.function.Function<T>
ch.njol.skript.lang.function.ScriptFunction<T>
-
Field Summary
Fields inherited from class ch.njol.skript.lang.function.Function
executeWithNulls -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable T[]execute(FunctionEvent<?> e, Object[][] params)Executes this function with given parameters.booleanResets the return value of theFunction.voidsetReturnValue(@Nullable T[] value)Should only be called byEffReturn.Methods inherited from class ch.njol.skript.lang.function.Function
execute, getName, getParameter, getParameters, getReturnType, getSignature, isSingle, toString
-
Constructor Details
-
ScriptFunction
-
-
Method Details
-
setReturnValue
Should only be called byEffReturn. -
execute
Description copied from class:FunctionExecutes this function with given parameters. Usually, usingFunction.execute(Object[][])is better; it handles optional arguments and function event creation automatically.- Specified by:
executein classFunction<T>- Parameters:
e- Associated function event. This is usually created by Skript.params- Function parameters. There must beSignature.getMaxParameters()amount of them, and you need to manually handle default values.- Returns:
- Function return value(s).
-
resetReturnValue
public boolean resetReturnValue()Description copied from class:FunctionResets the return value of theFunction. Should be called right after execution.- Specified by:
resetReturnValuein classFunction<T>- Returns:
- Whether or not the return value was successfully reset
-