Interface PaperExtension

All Known Implementing Classes:
PaperExtensionImpl

public interface PaperExtension
A paper plugin description configurable interface.
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    addDependencies(boolean optional, String... pluginNames)
    Adds dependencies to load before this plugin.
    default void
    addDependencies(String... pluginNames)
    Adds dependencies to load before this plugin.
    default void
    addDependency(String pluginName)
    Adds a dependency to load before this plugin.
    default void
    addDependency(String pluginName, boolean optional)
    Adds a dependency to load before this plugin.
    org.gradle.api.provider.Property<String>
    The API version which this plugin is designed to support.
    default void
    apiVersion(String apiVersion)
    Sets the API version.
    org.gradle.api.provider.SetProperty<String>
    The authors of the plugin.
    default void
    authors(String... authors)
    Sets the authors of the plugin.
    org.gradle.api.provider.SetProperty<Dependency>
    The dependencies required to load before this plugin.
    org.gradle.api.provider.Property<String>
    The description of the plugin.
    default void
    description(String description)
    Sets the description of the plugin.
    org.gradle.api.provider.Property<LoadOrder>
    The phase of server-startup this plugin will load during.
    default void
    load(LoadOrder loadOrder)
    Sets the plugin's load order.
    org.gradle.api.provider.Property<String>
    The plugin's initial class file.
    default void
    main(String main)
    Sets the plugin's initial class file.
    org.gradle.api.provider.Property<String>
    The name of the plugin.
    default void
    name(String name)
    Sets the name of the plugin.
    org.gradle.api.provider.Property<String>
    The version of the plugin.
    default void
    version(String version)
    Sets the version of the plugin.
  • Method Details

    • main

      @Nonnull org.gradle.api.provider.Property<String> main()
      The plugin's initial class file. This main can't start with minecraft packages or derivative.
      Returns:
      a property providing the plugin's initial class file
    • main

      default void main(@Nonnull String main)
      Sets the plugin's initial class file.
      Parameters:
      main - the plugin's initial class file
    • name

      @Nonnull org.gradle.api.provider.Property<String> name()
      The name of the plugin. This name should be unique as to not conflict with other plugins. The plugin name may contain alphanumeric characters, dashes, and underscores.
      Returns:
      a property providing the name for this plugin
    • name

      default void name(@Nonnull String name)
      Sets the name of the plugin.
      Parameters:
      name - the name of the plugin
    • version

      @Nonnull org.gradle.api.provider.Property<String> version()
      The version of the plugin. If not set, the version will be set to project's version.
      Returns:
      a property providing the version of the plugin
    • version

      default void version(@Nonnull String version)
      Sets the version of the plugin.
      Parameters:
      version - the version of the plugin
    • description

      @Nonnull org.gradle.api.provider.Property<String> description()
      The description of the plugin. If not set, the description will be set to project's description.
      Returns:
      a property providing the description of the plugin
    • description

      default void description(@Nonnull String description)
      Sets the description of the plugin.
      Parameters:
      description - the description of the plugin
    • authors

      @Nonnull org.gradle.api.provider.SetProperty<String> authors()
      The authors of the plugin.
      Returns:
      a property providing the author of the plugin
    • authors

      default void authors(@Nonnull String... authors)
      Sets the authors of the plugin.
      Parameters:
      authors - the authors of the plugin
    • load

      @Nonnull org.gradle.api.provider.Property<LoadOrder> load()
      The phase of server-startup this plugin will load during.
      Returns:
      a property providing the plugin's load order
    • load

      default void load(@Nonnull LoadOrder loadOrder)
      Sets the plugin's load order.
      Parameters:
      loadOrder - the plugin's load order
    • dependencies

      @Nonnull org.gradle.api.provider.SetProperty<Dependency> dependencies()
      The dependencies required to load before this plugin.
      Returns:
      a property providing the plugin dependencies
    • addDependency

      default void addDependency(@Nonnull String pluginName)
      Adds a dependency to load before this plugin.

      By default this dependency is not optional, it will be a hard-dependency. If you want to add a soft-dependency, use other addDependency method.

      Parameters:
      pluginName - the plugin name of the dependency
    • addDependency

      default void addDependency(@Nonnull String pluginName, boolean optional)
      Adds a dependency to load before this plugin.
      Parameters:
      pluginName - the plugin name of the dependency
      optional - whether the dependency is not required to enable this plugin
    • addDependencies

      default void addDependencies(@Nonnull String... pluginNames)
      Adds dependencies to load before this plugin.

      By default these dependencies are not optional, it will be hard-dependencies. If you want to add soft-dependencies, use other addDependencies method.

      Parameters:
      pluginNames - the plugin name of the dependencies
    • addDependencies

      default void addDependencies(boolean optional, @Nonnull String... pluginNames)
      Adds dependencies to load before this plugin.
      Parameters:
      optional - whether the dependencies are not required to enable this plugin
      pluginNames - the plugin name of the dependencies
    • apiVersion

      @Nonnull org.gradle.api.provider.Property<String> apiVersion()
      The API version which this plugin is designed to support.
      Returns:
      a property providing the api version
    • apiVersion

      default void apiVersion(@Nonnull String apiVersion)
      Sets the API version.
      Parameters:
      apiVersion - the API version