Skip to content

Commit

Permalink
feat: add CommandExecutor as the base class of Plugin in the bind…
Browse files Browse the repository at this point in the history
…ing code
  • Loading branch information
wu-vincent committed Mar 6, 2024
1 parent 65b9a22 commit edb53e6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion python/src/endstone/_internal/endstone_python.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ class Logger:
"""
Get the name of this Logger instance.
"""
class Plugin:
class Plugin(CommandExecutor):
def __init__(self) -> None:
...
def _get_description(self) -> PluginDescription:
Expand Down
2 changes: 1 addition & 1 deletion src/endstone_python/plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ void init_plugin(py::module &m)

py_class<PluginLoader, PyPluginLoader>(m, "PluginLoader");

py_class<Plugin, PyPlugin>(m, "Plugin")
py_class<Plugin, CommandExecutor, PyPlugin>(m, "Plugin")
.def(py::init<>())
.def("on_load", &Plugin::onLoad, "Called after a plugin is loaded but before it has been enabled.")
.def("on_enable", &Plugin::onEnable, "Called when this plugin is enabled")
Expand Down

0 comments on commit edb53e6

Please sign in to comment.