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) constDisables the specified plugin Attempting to disable a plugin that is not enabled will have no effect.
Parameters:
pluginPlugin to disable
enablePlugin
void enablePlugin(Plugin &plugin) constEnables the specified plugin Attempting to enable a plugin that is already enabled will have no effect.
Parameters:
pluginPlugin to enable
getPluginFileFilters
std::vector<std::string> getPluginFileFilters() constReturns a list of all filename filters expected by this PluginLoader .
Returns:
The filters
getServer
Server &getServer() constRetrieves 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:
fileFile 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:
directoryDirectory to check for plugins
Returns:
A list of all plugins loaded