Skip to Content
⚠ Under Construction
ReferenceC++ APIPluginLoader

endstone::PluginLoader

Represents a plugin loader, which handles direct access to specific types of plugins.

Functions:

NameDescription
PluginLoader
PluginLoader
disablePluginDisables the specified plugin Attempting to disable a plugin that is not enabled will have no effect.
enablePluginEnables the specified plugin Attempting to enable a plugin that is already enabled will have no effect.
getPluginFileFiltersReturns a list of all filename filters expected by this PluginLoader .
getServerRetrieves the Server object associated with the PluginLoader .
loadPlugin
loadPluginsLoads the plugin contained within the specified directory.

PluginLoader

PluginLoader(Server &server)
PluginLoader(const PluginLoader &) = delete

disablePlugin

void disablePlugin(Plugin &plugin) const

Disables the specified plugin Attempting to disable a plugin that is not enabled will have no effect.

Parameters:

enablePlugin

void enablePlugin(Plugin &plugin) const

Enables the specified plugin Attempting to enable a plugin that is already enabled will have no effect.

Parameters:

getPluginFileFilters

std::vector<std::string> getPluginFileFilters() const

Returns a list of all filename filters expected by this PluginLoader .

Returns:

The filters

getServer

Server &getServer() const

Retrieves the Server object associated with the PluginLoader .

This function returns a reference to the Server object that the PluginLoader is associated with.

Returns:

The Server reference.

loadPlugin

Plugin *loadPlugin(std::string file)

Loads the plugin contained in the specified file

Parameters:

  • file File to attempt to load

Returns:

Plugin that was contained in the specified file, or nullptr if unsuccessful

loadPlugins

std::vector<Plugin *> loadPlugins(std::string directory)

Loads the plugin contained within the specified directory.

Parameters:

  • directory Directory to check for plugins

Returns:

A list of all plugins loaded

Last updated on