Class SimpleJavaFunction<T>


public abstract class SimpleJavaFunction<T> extends JavaFunction<T>
A JavaFunction which doesn't make use of the FunctionEvent instance and that cannot accept empty / null parameters.
  • Constructor Details

    • SimpleJavaFunction

      public SimpleJavaFunction(Signature<T> sign)
    • SimpleJavaFunction

      public SimpleJavaFunction(String name, Parameter<?>[] parameters, ClassInfo<T> returnType, boolean single)
  • Method Details

    • execute

      public final @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 JavaFunction<T>
      Parameters:
      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.
      Returns:
      Function return value(s).
    • executeSimple

      public abstract @Nullable T[] executeSimple(Object[][] params)