Package ch.njol.skript.lang.function
Class SimpleJavaFunction<T>
java.lang.Object
ch.njol.skript.lang.function.Function<T>
ch.njol.skript.lang.function.JavaFunction<T>
ch.njol.skript.lang.function.SimpleJavaFunction<T>
A
JavaFunction
which doesn't make use of
the FunctionEvent
instance and that cannot
accept empty / null
parameters.-
Field Summary
Fields inherited from class ch.njol.skript.lang.function.Function
executeWithNulls
-
Constructor Summary
ConstructorDescriptionSimpleJavaFunction(Signature<T> sign)
SimpleJavaFunction(String name, Parameter<?>[] parameters, ClassInfo<T> returnType, boolean single)
-
Method Summary
Modifier and TypeMethodDescription@Nullable T[]
execute(FunctionEvent<?> e, Object[][] params)
Executes this function with given parameters.abstract @Nullable T[]
executeSimple(Object[][] params)
Methods inherited from class ch.njol.skript.lang.function.JavaFunction
description, examples, getDescription, getExamples, getSince, resetReturnValue, since
Methods inherited from class ch.njol.skript.lang.function.Function
execute, getName, getParameter, getParameters, getReturnType, getSignature, isSingle, toString
-
Constructor Details
-
SimpleJavaFunction
-
SimpleJavaFunction
-
-
Method Details
-
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 classJavaFunction<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).
-
executeSimple
-