endstone::PluginLoader
Represents a plugin loader, which handles direct access to specific types of plugins.
Functions:
Name | Description |
---|---|
PluginLoader | |
PluginLoader | |
disablePlugin | Disables the specified plugin Attempting to disable a plugin that is not enabled will have no effect. |
enablePlugin | Enables the specified plugin Attempting to enable a plugin that is already enabled will have no effect. |
getPluginFileFilters | Returns a list of all filename filters expected by this PluginLoader . |
getServer | Retrieves the Server object associated with the PluginLoader . |
loadPlugin | |
loadPlugins | Loads 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:
plugin
Plugin to disable
enablePlugin
void enablePlugin(Plugin &plugin) const
Enables the specified plugin Attempting to enable a plugin that is already enabled will have no effect.
Parameters:
plugin
Plugin to enable
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