Skip to content

Commit 47ae045

Browse files
committed
refactor: rename project and simplify pyproject.toml
1 parent 2c9d2d2 commit 47ae045

7 files changed

Lines changed: 23 additions & 65 deletions

File tree

CHANGELOG.md

Lines changed: 0 additions & 17 deletions
This file was deleted.

README.md

Lines changed: 16 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
# Endstone Python Plugin Template
1+
# Endstone Python Example Plugin
22

3-
Welcome to the official Python plugin template for Endstone. This repository provides a basic structure and a sample
4-
plugin to help developers start writing plugins for the Bedrock Dedicated Servers in Python using the Endstone API.
3+
Welcome to the Example Python plugin for Endstone servers.
54

65
## Prerequisites
76

@@ -11,41 +10,33 @@ plugin to help developers start writing plugins for the Bedrock Dedicated Server
1110
## Structure Overview
1211

1312
```
14-
python-plugin-template/
15-
├── src/ # Main source directory
16-
│ └── endstone_plugin/ # Directory for the plugin package
17-
│ ├── __init__.py # Initializer for the package, importing ExamplePlugin class from example_plugin.py
18-
│ ├── example_plugin.py # Implementation of ExamplePlugin class
19-
│ └── python_command.py # Custom command executor for /python
20-
├── .gitignore # Git ignore rules
21-
├── CHANGELOG.md # Changelogs
22-
├── LICENSE # License details
23-
├── README.md # This file
24-
└── pyproject.toml # Plugin configuration file which specifies the entrypoint
13+
python-example-plugin/
14+
├── src/ # Main source directory
15+
│ └── endstone_python_example_plugin/ # Directory for the plugin package
16+
│ ├── __init__.py # Initializer for the package, importing ExamplePlugin class from example_plugin.py
17+
│ ├── example_plugin.py # Implementation of ExamplePlugin class
18+
│ └── python_command.py # Custom command executor for /python
19+
├── .gitignore # Git ignore rules
20+
├── LICENSE # License details
21+
├── README.md # This file
22+
└── pyproject.toml # Plugin configuration file which specifies the entrypoint
2523
```
2624

2725
## Getting Started
2826

2927
1. **Clone this Repository**
3028

3129
```bash
32-
git clone https://github.com/EndstoneMC/python-plugin-template.git
30+
git clone https://github.com/EndstoneMC/python-example-plugin.git
3331
```
3432

3533
2. **Navigate to the Cloned Directory**
3634

3735
```bash
38-
cd python-plugin-template
36+
cd python-example-plugin
3937
```
4038

41-
3. **Configurate**
42-
1. Open the `pyproject.toml` and change the `name` under the `[project]` section from `endstone-plugin` to your own
43-
name for your plugin.
44-
2. Rename the folder `src/endstone_plugin` to `src/{your_plugin_name}`.
45-
3. Rename the `PythonSamplePlugin` class within `src/{your_plugin_name}/__init__.py` to, for example.
46-
4. Open the `pyproject.toml` again and update the entrypoint under the `[project.entry-points."endstone"]` section.
47-
48-
4. **Test Your Plugin**
39+
3. **Install Your Plugin**
4940

5041
When developing the plugin, you may want to install an editable package to your Python environment, this allows you
5142
to update the codes without having to reinstall the package everytime:
@@ -57,7 +48,7 @@ python-plugin-template/
5748

5849
Ensure your plugin is loaded correctly by checking the server logs or console for the log messages.
5950

60-
5. **Package and Distribute Your Plugin**
51+
4. **Package and Distribute Your Plugin**
6152

6253
When everything is good to go, you can package your plugin into a `.whl` (Wheel) file for easier distribution:
6354

pyproject.toml

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

55
[project]
6-
name = "python-example-plugin"
6+
name = "endstone-python-example-plugin"
77
version = "0.2.0"
88
dependencies = []
9-
requires-python = ">=3.9"
109
authors = [
1110
{ name = "Endstone Developers", email = "hello@endstone.dev" },
1211
]
13-
maintainers = [
14-
{ name = "Vincent Wu", email = "magicdroidx@gmail.com" },
15-
{ name = "Endstone Developers", email = "hello@endstone.dev" }
16-
]
17-
description = "Official Python plugin template for Endstone servers"
12+
description = "Python example plugin for Endstone servers"
1813
readme = "README.md"
1914
license = { file = "LICENSE" }
2015
keywords = ["endstone", "plugin"]
21-
classifiers = [
22-
"Development Status :: 3 - Alpha",
23-
"Programming Language :: Python"
24-
]
25-
26-
[project.optional-dependencies]
27-
endstone = ["endstone~=1.20"]
2816

2917
[project.urls]
3018
Homepage = "https://github.com/EndstoneMC/python-plugin-template"
31-
Documentation = "https://readthedocs.org"
32-
Repository = "https://github.com/EndstoneMC/python-plugin-template.git"
33-
Issues = "https://github.com/EndstoneMC/python-plugin-template/issues"
34-
Changelog = "https://github.com/EndstoneMC/python-plugin-template/blob/main/CHANGELOG.md"
3519

3620
[project.entry-points."endstone"]
37-
python_example_plugin = "endstone_example:ExamplePlugin"
21+
python-example-plugin = "endstone_python_example_plugin:ExamplePlugin"

src/endstone_example/__init__.py

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from endstone_python_example_plugin.example_plugin import ExamplePlugin
2+
3+
__all__ = ["ExamplePlugin"]

src/endstone_example/example_plugin.py renamed to src/endstone_python_example_plugin/example_plugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from endstone.command import Command, CommandSender
22
from endstone.plugin import Plugin
33

4-
from endstone_example.python_command import PythonCommandExecutor
4+
from endstone_python_example_plugin.python_command import PythonCommandExecutor
55

66

77
class ExamplePlugin(Plugin):
File renamed without changes.

0 commit comments

Comments
 (0)