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
-
Method Summary
Modifier and TypeMethodDescription@Nullable T[]
execute(FunctionEvent<?> e, Object[][] params)
Executes this function with given parameters.boolean
Resets the return value of theFunction
.void
setReturnValue(@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:Function
Executes this function with given parameters. Usually, usingFunction.execute(Object[][])
is better; it handles optional arguments and function event creation automatically.- Specified by:
execute
in 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:Function
Resets the return value of theFunction
. Should be called right after execution.- Specified by:
resetReturnValue
in classFunction<T>
- Returns:
- Whether or not the return value was successfully reset
-