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

Method load_plugins

endstone/plugin/plugin_loader.py:144–159  ·  view source on GitHub ↗
(self, directory: str)

Source from the content-addressed store, hash-verified

142 return None
143
144 def load_plugins(self, directory: str) -> list[Plugin]:
145 loaded_plugins = []
146
147 if not self._plugins:
148 eps = entry_points(group="endstone")
149 for ep in eps:
150 plugin = self._load_plugin_from_ep(ep)
151 if plugin:
152 loaded_plugins.append(plugin)
153
154 for file in glob.glob(os.path.join(directory, "*.whl")):
155 plugin = self.load_plugin(file)
156 if plugin:
157 loaded_plugins.append(plugin)
158
159 return loaded_plugins
160
161 def _load_plugin_from_ep(self, ep: EntryPoint) -> Plugin | None:
162 # enforce naming convention

Callers

nothing calls this directly

Calls 2

_load_plugin_from_epMethod · 0.95
load_pluginMethod · 0.95

Tested by

no test coverage detected