Giter Club home page Giter Club logo

Comments (5)

lare96 avatar lare96 commented on June 2, 2024

I want it to be designed like so...

Plugin

  • Base class for all plugins, all plugins must extend this class. will give access to the world, plugin manager, game service, and player as protected fields and will also have common methods to make development easier (like an inline schedule method for tasks, actions, etc). will also contain an abstract method describing what the plugin does

PluginEnvironment

  • An annotation with a single argument of a class extending PluginContext

PluginEnvironmentException

  • An exception detailing a Plugin with an invalid environment

PluginExecutionException

  • An exception detailing a Plugin that throws an exception during execution

PluginPipeline

  • A pipeline dedicated to a certain PluginContext, contains all of the Plugin's in the order they were added

PluginManager

  • Maintains a map of PluginContext's to PluginPipeline's

from luna.

lare96 avatar lare96 commented on June 2, 2024

Changing PluginEnvironment from annotation to an external file that allows for more data, and PluginEnvironmentException to PluginRegisterationException

from luna.

rmcmk avatar rmcmk commented on June 2, 2024

Trying to remove the need for the annotation and external file would be a good move -- it's overly complex for 'drag-and-drop' like features (and a tad confusing for inexperienced users)

Rather than annotating to a specific 'event' or 'context' I would let event listeners/events in general be extended.

Plugins can then be organized into a multimap/pipeline like structure, going down the pipeline until the chain is broken (click door, door opens in one plugin, door also completes part of a quest in another plugin [tutorial island?], break chain)

from luna.

lare96 avatar lare96 commented on June 2, 2024

I like that idea much better actually, of just having multiple "base listeners" that can be extended

from luna.

lare96 avatar lare96 commented on June 2, 2024

Fixed in most recent commit

from luna.

Related Issues (20)

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.