Skip to content

Class endstone::PluginDescription

ClassList > endstone > PluginDescription

Represents the basic information about a plugin that the plugin loader needs to know.

  • #include <endstone/plugin/plugin_description.h>

Public Functions

Type Name
PluginDescription (std::string name, std::string version, std::string description="", PluginLoadOrder load=PluginLoadOrder::PostWorld, std::vector< std::string > authors={}, std::vector< std::string > contributors={}, std::string website="", std::string prefix="", std::vector< std::string > provides={}, std::vector< std::string > depend={}, std::vector< std::string > soft_depend={}, std::vector< std::string > load_before={}, PermissionDefault default_permission=PermissionDefault::Operator, std::vector< Command > commands={}, std::vector< Permission > permissions={})
std::string getAPIVersion () const
std::vector< std::string > getAuthors () const
std::vector< Command > getCommands () const
std::vector< std::string > getContributors () const
PermissionDefault getDefaultPermission () const
std::vector< std::string > getDepend () const
std::string getDescription () const
std::string getFullName () const
PluginLoadOrder getLoad () const
std::vector< std::string > getLoadBefore () const
std::string getName () const
std::vector< Permission > getPermissions () const
std::string getPrefix () const
std::vector< std::string > getProvides () const
std::vector< std::string > getSoftDepend () const
std::string getVersion () const
std::string getWebsite () const

Public Functions Documentation

function PluginDescription

inline endstone::PluginDescription::PluginDescription (
    std::string name,
    std::string version,
    std::string description="",
    PluginLoadOrder load=PluginLoadOrder::PostWorld,
    std::vector< std::string > authors={},
    std::vector< std::string > contributors={},
    std::string website="",
    std::string prefix="",
    std::vector< std::string > provides={},
    std::vector< std::string > depend={},
    std::vector< std::string > soft_depend={},
    std::vector< std::string > load_before={},
    PermissionDefault default_permission=PermissionDefault::Operator,
    std::vector< Command > commands={},
    std::vector< Permission > permissions={}
) 

function getAPIVersion

inline std::string endstone::PluginDescription::getAPIVersion () const

Gives the API version which this plugin is designed to support.

Returns:

the API version supported by the plugin


function getAuthors

inline std::vector< std::string > endstone::PluginDescription::getAuthors () const

Gives the list of authors for the plugin.

Returns:

an immutable list of the plugin's authors


function getCommands

inline std::vector< Command > endstone::PluginDescription::getCommands () const

Gives the list of commands the plugin will register at runtime.

Returns:

the commands this plugin will register


function getContributors

inline std::vector< std::string > endstone::PluginDescription::getContributors () const

Gives the list of contributors for the plugin.

Returns:

an immutable list of the plugin's contributions


function getDefaultPermission

inline PermissionDefault endstone::PluginDescription::getDefaultPermission () const

Gives the default value of permissions registered for the plugin.

Returns:

the default value for the plugin's permissions


function getDepend

inline std::vector< std::string > endstone::PluginDescription::getDepend () const

Gives a list of other plugins that the plugin requires.

Returns:

immutable list of the plugin's dependencies


function getDescription

inline std::string endstone::PluginDescription::getDescription () const

Gives a human-friendly description of the functionality the plugin provides.

Returns:

description of this plugin, or empty if not specified


function getFullName

inline std::string endstone::PluginDescription::getFullName () const

Returns the name of a plugin, including the version.

Returns:

a descriptive name of the plugin and respective version


function getLoad

inline PluginLoadOrder endstone::PluginDescription::getLoad () const

Gives the phase of server startup that the plugin should be loaded.

Returns:

the phase when the plugin should be loaded


function getLoadBefore

inline std::vector< std::string > endstone::PluginDescription::getLoadBefore () const

Gets the list of plugins that should consider this plugin a soft-dependency.

Returns:

immutable list of plugins that should consider this plugin a soft-dependency


function getName

inline std::string endstone::PluginDescription::getName () const

Gives the name of the plugin. This name is a unique identifier for plugins.

Returns:

the name of the plugin


function getPermissions

inline std::vector< Permission > endstone::PluginDescription::getPermissions () const

Gives the list of permissions the plugin will register at runtime, immediately proceeding enabling.

Returns:

the permissions this plugin will register


function getPrefix

inline std::string endstone::PluginDescription::getPrefix () const

Gives the token to prefix plugin-specific logging messages with.

Returns:

the prefixed logging token, or empty if not specified


function getProvides

inline std::vector< std::string > endstone::PluginDescription::getProvides () const

Gives the list of other plugin APIs which this plugin provides. These are usable for other plugins to depend on.

Returns:

immutable list of the plugin APIs which this plugin provides


function getSoftDepend

inline std::vector< std::string > endstone::PluginDescription::getSoftDepend () const

Gives a list of other plugins that the plugin requires for full functionality.

Returns:

immutable list of the plugin's preferred dependencies


function getVersion

inline std::string endstone::PluginDescription::getVersion () const

Gives the version of the plugin.

Returns:

the version of the plugin


function getWebsite

inline std::string endstone::PluginDescription::getWebsite () const

Gives the plugin's or plugin's author's website.

Returns:

the website of this plugin, or empty if not specified



The documentation for this class was generated from the following file include/endstone/plugin/plugin_description.h