Git Product home page Git Product logo

Comments (7)

AdorablePotato avatar AdorablePotato commented on September 22, 2024

Hi, this was the case in version 2. The EMSM needs to know how it can interact with a server. A problem in v2 was, that the vanilla server used another stop command than bungeecord. Another problem was, that the log files had different names. So the EMSM will always need a compatible ServerWrapper subclass for a server to work.

But I don't want so say no to your proposal, since it is a problem to keep the EMSM up to date easily. So, what would you like to be able configure exactly?

from emsm.

Silthus avatar Silthus commented on September 22, 2024

You could make the ServerWrapper a plugin and allow dynamic loading of wrappers. So you could have a folder server-wrappers/ and inside multiple classes that define the different wrappers.
This way users who can program python can easly add new wrappers and the main code does not need to be modified. Also this way you get around the compatibility problem with bungeecord for example.

from emsm.

AdorablePotato avatar AdorablePotato commented on September 22, 2024

I could extend the server manager, so that users can add their own server wrappers or overwrite exiting. Then the user could simply write a plugin which registers the new server wrapper subclasses.
Unfortunetly, I don't have much time at the moment and I don't know, when I can make those changes. Perhaps next weekend.

from emsm.

Silthus avatar Silthus commented on September 22, 2024

Sounds great!

from emsm.

AdorablePotato avatar AdorablePotato commented on September 22, 2024

With 385ab4c I added everything mentioned before. So you can add your own server wrapper now in a plugin module:

#!/usr/bin/python3

import emsm

PLUGIN = "MyServerAdder"

class MyServer(emsm.server.BaseServerWrapper):

    @classmethod
    def name(self):
        return "my server wrapper"

    def install(self):
        pass

    # You must define all other *virtual* methods of BaseServerWrapper
    # So ...


class MyServerAdder(emsm.base_plugin.BasePlugin):

    # We don't need a command line interface.
    HIDDEN = True

    def __init__(self, app, name):
        super().__init__(app, name)

        app.server().add(MyServer)
        return None

from emsm.

AdorablePotato avatar AdorablePotato commented on September 22, 2024

For the future it may be wise to add an update method for the EMSM itself or to allow special server configurations for each world. But these would be bigger changes.

I hope this patch works for you at the moment.

from emsm.

Silthus avatar Silthus commented on September 22, 2024

Awesome thank you for the implementation!

from emsm.

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.