MCPcopy Create free account
hub / github.com/EndstoneMC/endstone / PythonPluginLoader

Method PythonPluginLoader

src/endstone/core/plugin/python_plugin_loader.cpp:24–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22namespace endstone::core {
23
24PythonPluginLoader::PythonPluginLoader(Server &server) : PluginLoader(server)
25{
26 try {
27 py::gil_scoped_acquire gil{};
28 auto module = py::module_::import("endstone.plugin.plugin_loader");
29 auto cls = module.attr("PythonPluginLoader");
30 obj_ = cls(std::ref(server));
31 }
32 catch (std::exception &e) {
33 server.getLogger().error("Error occurred when trying to register a plugin loader: {}", e.what());
34 throw;
35 }
36}
37
38PythonPluginLoader::~PythonPluginLoader()
39{

Callers

nothing calls this directly

Calls 2

clsFunction · 0.50
errorMethod · 0.45

Tested by

no test coverage detected