Skip to content

Implement the plugins system #47

Description

@Otaku17

Description

Implement a plugin system for OnlineServer to allow developers to extend the server's functionality without modifying the core codebase.

Goals

  • Automatically load plugins from a dedicated plugins/ directory.
  • Provide a plugin lifecycle (load, enable, disable, unload).
  • Expose a public API for interacting with the server (events, commands, packets, etc.).
  • Allow plugins to register and unregister their own features.
  • Support plugin dependencies and version checks.
  • Prevent a failing plugin from crashing the entire server.
  • Make future extensions and community contributions easier.

Example structure

plugins/
 ├── ExamplePlugin/
 │   ├── plugin.json
 │   └── index.ts

Example plugin.json:

{
  "name": "ExamplePlugin",
  "version": "1.0.0",
  "main": "index.ts",
  "author": "Pokemon Workshop"
}

Benefits

  • Easier customization of OnlineServer.
  • Better maintainability of the core project.
  • Encourages third-party extensions and community-driven features.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

serverIssued related to server side development

Fields

Design status

None yet

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions