Class FunctionReference<T>

java.lang.Object
ch.njol.skript.lang.function.FunctionReference<T>

public class FunctionReference<T> extends Object
Reference to a Skript function.
  • Field Details

    • script

      public final @Nullable String script
      Script in which this reference is found. Used for function unload safety checks.
  • Constructor Details

    • FunctionReference

      public FunctionReference(String functionName, @Nullable Node node, @Nullable String script, @Nullable Class<? extends T>[] returnTypes, Expression<?>[] params)
  • 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

      public @Nullable Function<? extends T> getFunction()
    • resetReturnValue

      public boolean resetReturnValue()
    • execute

      protected @Nullable T[] execute(org.bukkit.event.Event e)
    • isSingle

      public boolean isSingle()
    • getReturnType

      public @Nullable Class<? extends T> getReturnType()
    • toString

      public String toString(@Nullable org.bukkit.event.Event e, boolean debug)