Package ch.njol.skript.lang.function
Class FunctionReference<T>
java.lang.Object
ch.njol.skript.lang.function.FunctionReference<T>
Reference to a Skript function.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionFunctionReference(String functionName, @Nullable Node node, @Nullable String script, @Nullable Class<? extends T>[] returnTypes, Expression<?>[] params)
-
Method Summary
Modifier and TypeMethodDescriptionprotected @Nullable T[]
execute(org.bukkit.event.Event e)
boolean
isSingle()
boolean
toString(@Nullable org.bukkit.event.Event e, boolean debug)
boolean
validateFunction(boolean first)
Validates this function reference.
-
Field Details
-
script
Script in which this reference is found. Used for function unload safety checks.
-
-
Constructor Details
-
FunctionReference
-
-
Method Details
-
validateFunction
public boolean validateFunction(boolean first)Validates this function reference. Prints errors if needed.- Parameters:
first
- True if this is called while loading a script. False when this is called when the function signature changes.- Returns:
- True if validation succeeded.
-
getFunction
-
resetReturnValue
public boolean resetReturnValue() -
execute
-
isSingle
public boolean isSingle() -
getReturnType
-
toString
-