Skip to content

Commit bb57ad0

Browse files
committed
refactor: plugin structure
1 parent 660c908 commit bb57ad0

3 files changed

Lines changed: 11 additions & 7 deletions

File tree

pyproject.toml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@ requires = ["setuptools >= 61.0"]
33
build-backend = "setuptools.build_meta"
44

55
[project]
6-
name = "endstone-plugin"
7-
version = "0.1.0"
8-
dependencies = [
9-
"endstone",
10-
]
6+
name = "python-example-plugin"
7+
version = "0.2.0"
8+
dependencies = []
119
requires-python = ">=3.9"
1210
authors = [
1311
{ name = "Endstone Developers", email = "hello@endstone.dev" },
@@ -25,6 +23,9 @@ classifiers = [
2523
"Programming Language :: Python"
2624
]
2725

26+
[project.optional-dependencies]
27+
endstone = ["endstone~=1.20"]
28+
2829
[project.urls]
2930
Homepage = "https://github.com/EndstoneMC/python-plugin-template"
3031
Documentation = "https://readthedocs.org"
@@ -33,4 +34,4 @@ Issues = "https://github.com/EndstoneMC/python-plugin-template/issues"
3334
Changelog = "https://github.com/EndstoneMC/python-plugin-template/blob/main/CHANGELOG.md"
3435

3536
[project.entry-points."endstone"]
36-
endstone_plugin = "endstone_plugin:PythonSamplePlugin"
37+
python_example_plugin = "endstone_example:ExamplePlugin"

src/endstone_example/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from endstone_example.example_plugin import ExamplePlugin
2+
3+
__all__ = ["ExamplePlugin"]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from endstone.plugin import Plugin
22

33

4-
class PythonSamplePlugin(Plugin):
4+
class ExamplePlugin(Plugin):
55
def on_load(self) -> None:
66
self.logger.info("on_load is called!")
77

0 commit comments

Comments
 (0)