Interface Function<T>

All Known Subinterfaces:
DefaultFunction<T>
All Known Implementing Classes:
Function, JavaFunction, ScriptFunction, SimpleJavaFunction

@NonExtendable @Internal @Experimental public interface Function<T>
Represents a function implementation.

This interface should only be extended by DefaultFunction and Function

It will contain methods when Function has been properly reworked.

  • Method Details

    • execute

      T execute(@NotNull @NotNull FunctionEvent<?> event, @NotNull @NotNull FunctionArguments arguments)
      Executes this function with the given parameters.
      Parameters:
      event - The event that is associated with this function execution.
      arguments - The arguments to execute the function with.
      Returns:
      The return value.
    • signature

      @NotNull @NotNull Signature<T> signature()
      Returns:
      The signature belonging to this function.
    • resetReturnValue

      @Experimental boolean resetReturnValue()
      Resets the return value.
    • returnedKeys

      @Experimental @NotNull @NotNull String @Nullable [] returnedKeys()
      Returns:
      The returned keys.