12#ifndef MINESERVER_PLUGINS_H
13#define MINESERVER_PLUGINS_H
48 explicit Plugin(std::string path);
73 static constexpr std::string_view BASE_PATH =
"./plugins/";
74 std::vector<std::shared_ptr<Plugin>> plugins;
102 const std::vector<std::shared_ptr<Plugin>> &
getPlugins()
const
Plugin class.
Definition plugins.h:25
bool load()
Loads the plugin.
Definition plugins.cpp:31
std::string name
Name of the plugin.
Definition plugins.h:37
Plugin(std::string path)
Construct a new Plugin object.
Definition plugins.cpp:22
std::string version
Version of the plugin.
Definition plugins.h:42
~Plugin()
Destroy the Plugin object.
Definition plugins.cpp:26
Plugin Manager.
Definition plugins.h:71
void load()
Load all plugins in plugin folder.
Definition plugins.cpp:87
static PluginsManager & inst()
Gets the instance of the plugin manager.
Definition plugins.h:112
PluginsManager()
Construct a new Plugins Manager object.
Definition plugins.cpp:73
~PluginsManager()
Destroy the Plugins Manager object.
Definition plugins.cpp:81
const std::vector< std::shared_ptr< Plugin > > & getPlugins() const
Get the registered plugins.
Definition plugins.h:102
constexpr std::string_view type_name()
Gets the name of the type paramater.
Definition event.h:56