1. Welcome to LilyPad. Download the project, explore the forums, and create your own LilyPad network.


    If you use the software and enjoy it or have a question, or would like to contribute to the future of the software directly or through resources, please sign up and join our little community.

[API Question] Cases in which ServerAdd and ServerRemove events are getting thrown

Discussion in 'Developer Ramblings' started by spaceemotion, Jun 30, 2014.

  1. spaceemotion

    spaceemotion New Member

    First of all: I don't know if this is the right sub forum for this thread or not; I find that the "support" forum is only for people with problems running lilypad on their server (in our case it is working flawlessly ;) ).

    My question is very simple:
    In which cases are the ServerAdd and ServerRemove events getting thrown?

    Some more background:
    Me and my team are currently working on revamping our server (actually, a huge network) from bungee to lilypad and I am in charge of the lobby stuff. This case I wanted to approach the sign updates a bit differently and didn't want to update the signs in an interval. The current system works like it should, and we have no problems at all - except for detecting server adds and removals.

    How can the lobby detect if a server gets added or removed from the cloud? The only way for me is to have a "sync" message to all servers and detect if something's coming back.

    Any ideas?
  2. Superfuzzy

    Superfuzzy Member

    i dont know anything about the Events, but you could, instead of the sync messages only send a "One-Way-Message":

    So everytime a server stops a plugin sends a message to all servers, that it disconnects. (in the OnDisable)
    And everytime it starts the Plugin sends a message to all servers that it has connected. (in the OnEnable)
    But you would need to have this Plugin/Code on every server..

    This would be a temp fix, but better than sending your sync messages.

Share This Page