Interface PluginMeta

All Known Implementing Classes:
PluginDescriptionFile

@NonExtendable @Experimental public interface PluginMeta
This class acts as an abstraction for a plugin configuration.
  • Method Details

    • getName

      Provides the name of the plugin. This name uniquely identifies the plugin amongst all loaded plugins on the server.

      In the plugin.yml, this entry is named name.

      Example:

      name: MyPlugin
      Returns:
      the name of the plugin
    • getDisplayName

      @NotNull default @NotNull String getDisplayName()
      Returns the display name of the plugin, including the version.
      Returns:
      a descriptive name of the plugin and respective version
    • getMainClass

      @NotNull @NotNull String getMainClass()
      Provides the fully qualified class name of the main class for the plugin. A subtype of JavaPlugin is expected at this location.
      Returns:
      the fully qualified class name of the plugin's main class.
    • getLoadOrder

      Returns the phase of the server startup logic that the plugin should be loaded.
      Returns:
      the plugin load order
      See Also:
    • getVersion

      @NotNull @NotNull String getVersion()
      Provides the version of this plugin as defined by the plugin. There is no inherit format defined/enforced for the version of a plugin, however a common approach might be schematic versioning.
      Returns:
      the string representation of the plugin's version
    • getLoggerPrefix

      @Nullable @Nullable String getLoggerPrefix()
      Provides the prefix that should be used for the plugin logger. The logger prefix allows plugins to overwrite the usual default of the logger prefix, which is the name of the plugin.
      Returns:
      the specific overwrite of the logger prefix as defined by the plugin. If the plugin did not define a custom logger prefix, this method will return null
    • getPluginDependencies

      @NotNull @NotNull List<String> getPluginDependencies()
      Provides a list of dependencies that are required for this plugin to load. The list holds the unique identifiers, following the constraints laid out in getName(), of the dependencies.

      If any of the dependencies defined by this list are not installed on the server, this plugin will fail to load.

      Returns:
      an immutable list of required dependency names
    • getPluginSoftDependencies

      @NotNull @NotNull List<String> getPluginSoftDependencies()
      Provides a list of dependencies that are used but not required by this plugin. The list holds the unique identifiers, following the constraints laid out in getName(), of the soft dependencies.

      If these dependencies are installed on the server, they will be loaded first and supplied as dependencies to this plugin, however the plugin will load even if these dependencies are not installed.

      Returns:
      immutable list of soft dependencies
    • getLoadBeforePlugins

      @NotNull @NotNull List<String> getLoadBeforePlugins()
      Provides a list of plugins that should be loaded before this plugin is loaded. The list holds the unique identifiers, following the constraints laid out in getName(), of the plugins that should be loaded before the plugin described by this plugin meta.

      The plugins referenced in the list provided by this method are not considered dependencies of this plugin and are hence not available to the plugin at runtime. They merely load before this plugin.

      Returns:
      immutable list of plugins to load before this plugin
    • getProvidedPlugins

      @NotNull @NotNull List<String> getProvidedPlugins()
      Returns the list of plugins/dependencies that this plugin provides. The list holds the unique identifiers, following the constraints laid out in getName(), for each plugin it provides the expected classes for.
      Returns:
      immutable list of provided plugins/dependencies
    • getAuthors

      @NotNull @NotNull List<String> getAuthors()
      Provides the list of authors that are credited with creating this plugin. The author names are in no particular format.
      Returns:
      an immutable list of the plugin's authors
    • getContributors

      @NotNull @NotNull List<String> getContributors()
      Provides a list of contributors that contributed to the plugin but are not considered authors. The names of the contributors are in no particular format.
      Returns:
      an immutable list of the plugin's contributors
    • getDescription

      @Nullable @Nullable String getDescription()
      Gives a human-friendly description of the functionality the plugin provides.
      Returns:
      description or null if the plugin did not define a human readable description.
    • getWebsite

      @Nullable @Nullable String getWebsite()
      Provides the website for the plugin or the plugin's author. The defined string value is not guaranteed to be in the form of a url.
      Returns:
      a string representation of the website that serves as the main hub for this plugin/its author.
    • getPermissions

      @NotNull @NotNull List<Permission> getPermissions()
      Provides the list of permissions that are defined via the plugin meta instance.
      Returns:
      an immutable list of permissions
    • getPermissionDefault

      @NotNull @NotNull PermissionDefault getPermissionDefault()
      Provides the default values that apply to the permissions defined in this plugin meta.
      Returns:
      the bukkit permission default container.
      See Also:
    • getAPIVersion

      @Nullable @Nullable String getAPIVersion()
      Gets the api version that this plugin supports. Nullable if this version is not specified, and should be considered legacy (spigot plugins only)
      Returns:
      the version string made up of the major and minor version (e.g. 1.18 or 1.19). Minor versions like 1.18.2 are unified to their major release version (in this example 1.18)