Class ScriptFunction<T>


public class ScriptFunction<T> extends Function<T>
  • Constructor Details

  • Method Details

    • setReturnValue

      public final void setReturnValue(@Nullable T[] value)
      Should only be called by EffReturn.
    • execute

      public @Nullable T[] execute(FunctionEvent<?> e, Object[][] params)
      Description copied from class: Function
      Executes this function with given parameters. Usually, using Function.execute(Object[][]) is better; it handles optional arguments and function event creation automatically.
      Specified by:
      execute in class Function<T>
      e - Associated function event. This is usually created by Skript.
      params - Function parameters. There must be Signature.getMaxParameters() amount of them, and you need to manually handle default values.
      Function return value(s).
    • resetReturnValue

      public boolean resetReturnValue()
      Description copied from class: Function
      Resets the return value of the Function. Should be called right after execution.
      Specified by:
      resetReturnValue in class Function<T>
      Whether or not the return value was successfully reset