Class endstone::PluginLoader¶
ClassList > endstone > PluginLoader
Represents a plugin loader, which handles direct access to specific types of plugins.
#include <endstone/plugin/plugin_loader.h>
Public Functions¶
Type | Name |
---|---|
PluginLoader (Server & server) |
|
PluginLoader (const PluginLoader &) = delete |
|
virtual void | disablePlugin (Plugin & plugin) const Disables the specified plugin Attempting to disable a plugin that is not enabled will have no effect. |
virtual void | enablePlugin (Plugin & plugin) const Enables the specified plugin Attempting to enable a plugin that is already enabled will have no effect. |
virtual std::vector< std::string > | getPluginFileFilters () const = 0 Returns a list of all filename filters expected by this PluginLoader . |
Server & | getServer () const Retrieves the Server object associated with thePluginLoader . |
virtual Plugin * | loadPlugin (std::string file) = 0 |
virtual std::vector< Plugin * > | loadPlugins (std::string directory) Loads the plugin contained within the specified directory. |
PluginLoader & | operator= (const PluginLoader &) = delete |
virtual | ~PluginLoader () = default |
Protected Attributes¶
Type | Name |
---|---|
Server & | server_ |
Public Functions Documentation¶
function PluginLoader [½]¶
function PluginLoader [2/2]¶
function disablePlugin¶
Disables the specified plugin Attempting to disable a plugin that is not enabled will have no effect.
Parameters:
plugin
Plugin to disable
function enablePlugin¶
Enables the specified plugin Attempting to enable a plugin that is already enabled will have no effect.
Parameters:
plugin
Plugin to enable
function getPluginFileFilters¶
Returns a list of all filename filters expected by this PluginLoader .
Returns:
The filters
function getServer¶
Retrieves the Server object associated with thePluginLoader .
This function returns a reference to the Server object that the PluginLoader is associated with.
Returns:
The Server reference.
function loadPlugin¶
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
function loadPlugins¶
Loads the plugin contained within the specified directory.
inline virtual std::vector< Plugin * > endstone::PluginLoader::loadPlugins (
std::string directory
)
Parameters:
directory
Directory to check for plugins
Returns:
A list of all plugins loaded
function operator=¶
function ~PluginLoader¶
Protected Attributes Documentation¶
variable server_¶
The documentation for this class was generated from the following file include/endstone/plugin/plugin_loader.h