Giter Site home page Giter Site logo

python-example-plugin's Introduction

Endstone Python Example Plugin

Welcome to the example Python plugin for Endstone servers.

Prerequisites

  • Python 3.9 or higher.
  • Endstone installed and set up in your Python environment.

Structure Overview

python-example-plugin/ 
├── src/                         # Main source directory 
│   └── endstone_example/        # Directory for the plugin package 
│       ├── __init__.py          # Initializer for the package, importing ExamplePlugin class from example_plugin.py
│       ├── example_plugin.py    # Implementation of ExamplePlugin class
│       └── python_command.py    # Custom command executor for /python
├── .gitignore                   # Git ignore rules
├── LICENSE                      # License details
├── README.md                    # This file
└── pyproject.toml               # Plugin configuration file which specifies the entrypoint

Getting Started

  1. Clone this Repository

    git clone https://github.com/EndstoneMC/python-example-plugin.git
  2. Navigate to the Cloned Directory

    cd python-example-plugin
  3. Install Your Plugin

    When developing the plugin, you may want to install an editable package to your Python environment, this allows you to update the codes without having to reinstall the package everytime:

    pip install -e .

    NOTE: It is strongly recommended to create a virtual environment for your Endstone server and plugins. When installing your plugin using pip install, please ensure the virtual environment is activated.

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

  4. Package and Distribute Your Plugin

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

    pip install pipx
    pipx run build --wheel

    This command will produce a .whl file in the dist directory. Copy the .whl file to the plugins directory of your Endstone server. Start the Endstone server and check the logs to ensure your plugin loads and operates as expected.

    To publish your plugin to a package index such as PyPI, please refer to:

Documentation

For a deeper dive into the Endstone API and its functionalities, refer to the main Endstone documentation (WIP).

License

This project is licensed under the MIT License - see the LICENSE file for details.

python-example-plugin's People

Contributors

wu-vincent avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.