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.


Discussion in 'Support' started by Rocoty, Jun 3, 2015.

  1. Rocoty

    Rocoty New Member

    Hey. I have a question not as much about trouble running LilyPad, but more about uncertainties about the Bukkit-Connect API. I have been searching and couldn't find anything addressing this, and I would assume this is the right place to post such a question.

    As I was reading the API Javadoc I cane across something that left me puzzled. Namely the AsProxyRequest and AsServerRequest classes. The Javadoc states the following about AsProxyRequest:
    Would this mean a Bukkit server can be used to act as a proxy? I am confused about this, as I don't see any usecases where this would be useful...apart from one. About the ServerAddEvent the Javadoc states this:
    This had me even more confused. Does this mean the server needs to be a proxy in order to be able to detect server adds and removes? If so, how exactly does a Bukkit server that is also a proxy, behave? And if not, why is this in the API?

    And one last question: If there is in fact no way to easily detect server adds and removes, what would be the recommended way to go about it? I would assume keep-alive messages...

    Thank you for answering.
  2. flamin_scotsman

    flamin_scotsman New Member

    The reason for some of the more obscure packets being listed is that connect plugin shades the entire lilypad packet library into itself, and as such, when the javadocs are generated, AsProxyRequest etc are included.

    While you can try to register your mc server as a proxy, the chances are you are going to break stuff hard, as you'll be de-authenticated as a server. (Assuming that is you registered as a proxy under a different user name to avoid authentication collisions)

    You are correct in deducing that only proxies will be notified of server additions - the reason it's there is the proxy is only given the server 'id' when redirecting a player, not the full host/port combo, so the proxy must know which servers are valid to redirect players to. The reason it's documented falls back to the initial statement of connect includes the entire lilypad protocol, not just the bukkit friendly stuff.

    Interestingly enough, the name ServerAddEvent is a bit of a misnomer, as servers get notified of new proxies using that packet (as most people only need a single lily proxy, they never see this in action).

    As for detecting current servers, indeed, keepalives are the only real way to do it, although there has been a ticket in for some time regarding opening up ServerAddEvent to actual servers.

    - flamin
    • Like Like x 1
  3. Rocoty

    Rocoty New Member

    Thank you for taking your time explaining this to me. It is much appreciated. I will proceed to use keepalives then.

Share This Page